From 1acdeee91389cf7f355edda5ad298bb89217f86f Mon Sep 17 00:00:00 2001 From: Johns Date: Fri, 9 Mar 2012 21:47:06 +0100 Subject: [PATCH] Adds ffmpeg 0.8.7 bug workaround: Single nal end seq aren't consumed and an endless loop entered. --- codec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codec.c b/codec.c index 8585862..0630874 100644 --- a/codec.c +++ b/codec.c @@ -558,6 +558,11 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt) video_ctx->frame_number, used); } if (used != pkt->size) { + // ffmpeg 0.8.7 dislikes our seq_end_h264 and enters endless loop here + if (used == 0 && pkt->size == 5 && pkt->data[4] == 0x0A) { + Warning("codec: ffmpeg 0.8.x workaround used\n"); + return; + } if (used >= 0 && used < pkt->size) { // some tv channels, produce this Debug(4,