diff options
author | Joakim Plate <elupus@ecce.se> | 2011-11-18 20:36:13 +0100 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2011-11-19 12:39:26 +0100 |
commit | 46d99a89aa16db1981441bf7103a30e7d28e5e26 (patch) | |
tree | c8b507a62c0e47b075a3a0712e8b9b2a479936ef /lib/ffmpeg/libavcodec | |
parent | 91a10f6c2ed258593949e212cdaf7ae97f7443af (diff) |
Don't fill in frame gaps with copied refs after flush
The filled in refs cause corruptions in the video frame
for a long time after it should have recovered.
Diffstat (limited to 'lib/ffmpeg/libavcodec')
-rw-r--r-- | lib/ffmpeg/libavcodec/h264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ffmpeg/libavcodec/h264.c b/lib/ffmpeg/libavcodec/h264.c index 87ec292655..0e002ce6a6 100644 --- a/lib/ffmpeg/libavcodec/h264.c +++ b/lib/ffmpeg/libavcodec/h264.c @@ -1464,7 +1464,7 @@ static void implicit_weight_table(H264Context *h, int field){ */ static void idr(H264Context *h){ ff_h264_remove_all_refs(h); - h->prev_frame_num= 0; + h->prev_frame_num= -1; h->prev_frame_num_offset= 0; h->prev_poc_msb= h->prev_poc_lsb= 0; @@ -1892,7 +1892,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ h->mb_field_decoding_flag= s->picture_structure != PICT_FRAME; if(h0->current_slice == 0){ - while(h->frame_num != h->prev_frame_num && + while(h->frame_num != h->prev_frame_num && h->prev_frame_num >= 0 && 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", h->frame_num, h->prev_frame_num); |