diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-13 22:36:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-13 23:19:51 +0100 |
commit | c230af9bccc3cadb373f9007ba14fffb6c2acc75 (patch) | |
tree | 575b9f1185f948e496c8660bd4c24e0474259d8a /libavcodec/h264.c | |
parent | 15e7533ca1a1a5d6bf0b35cf67b9e0a0bae7ee27 (diff) | |
download | ffmpeg-c230af9bccc3cadb373f9007ba14fffb6c2acc75.tar.gz |
h264: Reset last_pocs in case of reference or frame number inconsistencies
This prevents faulty increasing of has_b_frames
Should fix Ticket 2062
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 4687a8ffa7..cbf64c6995 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2984,6 +2984,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0) 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", h->frame_num, h->prev_frame_num); + if (!h->sps.gaps_in_frame_num_allowed_flag) + for(i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++) + h->last_pocs[i] = INT_MIN; if (ff_h264_frame_start(h) < 0) return -1; h->prev_frame_num++; |