ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Mon Jun  3 
20:26:21 2024 +0200| [ccd391d6a3afaa2e47f01ac51789082f1a39f03e] | committer: 
Anton Khirnov

lavc/hevcdec: do not unref current frame on frame_end() failure

It's a race with frame threading.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccd391d6a3afaa2e47f01ac51789082f1a39f03e
---

 libavcodec/hevc/hevcdec.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index a8c2172674..5fc55d5de9 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -3135,17 +3135,14 @@ static int hevc_frame_end(HEVCContext *s)
         if (ret < 0) {
             av_log(s->avctx, AV_LOG_ERROR,
                    "hardware accelerator failed to decode picture\n");
-            ff_hevc_unref_frame(s->cur_frame, ~0);
             return ret;
         }
     } else {
         if (s->avctx->err_recognition & AV_EF_CRCCHECK &&
             s->sei.picture_hash.is_md5) {
             ret = verify_md5(s, s->cur_frame->f);
-            if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE) {
-                ff_hevc_unref_frame(s->cur_frame, ~0);
+            if (ret < 0 && s->avctx->err_recognition & AV_EF_EXPLODE)
                 return ret;
-            }
         }
     }
     s->sei.picture_hash.is_md5 = 0;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to