This will fix video playback of the 4.07GB sample provided in #214. FFmpeg will report PIX_FMT_NONE for the video stream.
In #91, I added a check for PIX_FMT_NONE and reject stream creation for such files. However, we do already delay-init the sws scaler. So we can wait until the first frame is decoded, and use the pixel format from that frame to initialize the scaler. If a frame can be decoded, it will have a correct pixel format.
This will fix video playback of the 4.07GB sample provided in #214. FFmpeg will report PIX_FMT_NONE for the video stream.
In #91, I added a check for PIX_FMT_NONE and reject stream creation for such files. However, we do already delay-init the sws scaler. So we can wait until the first frame is decoded, and use the pixel format from that frame to initialize the scaler. If a frame can be decoded, it will have a correct pixel format.