PR #20512 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20512
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20512.patch


>From 6f07c9da0dd143e24e50f7cfb2030d7e885e5f71 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Sat, 13 Sep 2025 11:59:01 +0200
Subject: [PATCH] avcodec/rkmppdec: Close decoder generically on init failure

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/rkmppdec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
index dad0e4c25f..a5ed0fc9b7 100644
--- a/libavcodec/rkmppdec.c
+++ b/libavcodec/rkmppdec.c
@@ -257,7 +257,6 @@ static av_cold int rkmpp_init_decoder(AVCodecContext *avctx)
 
 fail:
     av_log(avctx, AV_LOG_ERROR, "Failed to initialize RKMPP decoder.\n");
-    rkmpp_close_decoder(avctx);
     return ret;
 }
 
@@ -563,7 +562,7 @@ static const AVCodecHWConfigInternal *const 
rkmpp_hw_configs[] = {
         .hw_configs     = rkmpp_hw_configs, \
         .bsfs           = BSFS, \
         .p.wrapper_name = "rkmpp", \
-        .caps_internal  = FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
+        .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP | 
FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
     };
 
 RKMPP_DEC(h264,  AV_CODEC_ID_H264,          "h264_mp4toannexb")
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to