]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_refs.c
Merge commit '10306e9c5fcc28bd9310a9b38f21540e9e1433e9'
[ffmpeg] / libavcodec / h264_refs.c
index 9bb065d24d9e018ad95e0969bf3851cde49bfc2f..de1f60a41f5b0f55352194e7f1f34d3855fe0424 100644 (file)
@@ -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)