diff --git a/FFMediaToolkit/src/Decoding/Internal/InputStream{TFrame}.cs b/FFMediaToolkit/src/Decoding/Internal/InputStream{TFrame}.cs index dd644ed..ab0349f 100644 --- a/FFMediaToolkit/src/Decoding/Internal/InputStream{TFrame}.cs +++ b/FFMediaToolkit/src/Decoding/Internal/InputStream{TFrame}.cs @@ -131,7 +131,7 @@ private void ReadNextFrame() DecodePacket(); // Gets the next packet and sends it to the decoder. error = ffmpeg.avcodec_receive_frame(CodecPointer, decodedFrame.Pointer); // Tries to decode frame from the packets. } - while (error == -ffmpeg.EAGAIN); // The EAGAIN code means that the frame decoding has not been completed and more packets are needed. + while (error == -ffmpeg.EAGAIN || error == -35); // The EAGAIN code means that the frame decoding has not been completed and more packets are needed. error.ThrowIfError("An error ocurred while decoding the frame."); }