Ignore bad decodes
This commit is contained in:
parent
5722f3af2f
commit
6be3938ae1
|
@ -568,7 +568,11 @@ int FfmpegCamera::CaptureAndRecord( Image &image, bool recording, char* event_fi
|
||||||
#else
|
#else
|
||||||
if ( avcodec_decode_video( mCodecContext, mRawFrame, &frameComplete, packet.data, packet.size ) < 0 )
|
if ( avcodec_decode_video( mCodecContext, mRawFrame, &frameComplete, packet.data, packet.size ) < 0 )
|
||||||
#endif
|
#endif
|
||||||
Fatal( "Unable to decode frame at frame %d", frameCount );
|
{
|
||||||
|
Error( "Unable to decode frame at frame %d, continuing...", frameCount );
|
||||||
|
av_free_packet( &packet );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Debug( 4, "Decoded video packet at frame %d", frameCount );
|
Debug( 4, "Decoded video packet at frame %d", frameCount );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue