diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index af70829594..2cdb67f978 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -806,6 +806,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h) } } + // Detect unmarked random access points if ( err >= 0 && h->long_ref_count==0 && ( h->short_ref_count<=2