For cases which prefer rejecting broken bitstreams. --- libavcodec/hevc_refs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c index 84a21991c7..9f8b6022c4 100644 --- a/libavcodec/hevc_refs.c +++ b/libavcodec/hevc_refs.c @@ -439,6 +439,8 @@ static int add_candidate_ref(HEVCContext *s, RefPicList *list, return 0; av_log(s->avctx, AV_LOG_ERROR, "Could not find ref with POC %d\n", poc); + if (s->avctx->err_recognition & AV_EF_COMPLIANT) + return AVERROR_INVALIDDATA; ref = generate_missing_ref(s, poc); if (!ref) -- 2.35.1