From 19c9d1e8e71da04c3ac940206619c0a2d01e5193 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Jun 2014 04:25:14 +0200 Subject: avcodec/h264: in the absence of recovery points, be more tolerant on accepting plain I frames Fixes: Ticket3652 Signed-off-by: Michael Niedermayer --- libavcodec/h264_refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/h264_refs.c') diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 9bb065d24d..de1f60a41f 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -775,7 +775,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count) if ( err >= 0 && h->long_ref_count==0 && (h->short_ref_count<=2 || h->pps.ref_count[0] <= 1 && h->pps.ref_count[1] <= 1 && pps_count == 1) - && h->pps.ref_count[0]<=2 + (h->picture_structure != PICT_FRAME) + && h->pps.ref_count[0]<=2 + (h->picture_structure != PICT_FRAME) + (2*!h->has_recovery_point) && h->cur_pic_ptr->f.pict_type == AV_PICTURE_TYPE_I){ h->cur_pic_ptr->recovered |= 1; if(!h->avctx->has_b_frames) -- cgit v1.2.3