[FFmpeg-cvslog] h264: dont mess with frame gaps on second fields.

Michael Niedermayer git at videolan.org
Sun Dec 16 00:28:57 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 15 23:33:20 2012 +0100| [d7599bd8e240b923486bd130a33d38f66bb14eae] | committer: Michael Niedermayer

h264: dont mess with frame gaps on second fields.

Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7599bd8e240b923486bd130a33d38f66bb14eae
---

 libavcodec/h264.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1fd1f38..60a25a1 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2834,7 +2834,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
             }
         }
 
-        while (h->frame_num != h->prev_frame_num && h->prev_frame_num >= 0 &&
+        while (h->frame_num != h->prev_frame_num && h->prev_frame_num >= 0 && !s0->first_field &&
                h->frame_num != (h->prev_frame_num + 1) % (1 << h->sps.log2_max_frame_num)) {
             Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
             av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n",



More information about the ffmpeg-cvslog mailing list