[FFmpeg-devel] [PATCH] avcodec/aac/aacdec_usac: Fix error code for NULL AACDecContext

Michael Niedermayer michael at niedermayer.cc
Thu Jun 27 01:48:22 EEST 2024


Found-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/aac/aacdec_usac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 4856c1786b7..3250fd71f6f 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -349,7 +349,7 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx,
     uint8_t layout_map[MAX_ELEM_ID*4][3] = { 0 };
 
     if (!ac)
-        return AVERROR_PATCHWELCOME;
+        return AVERROR_INVALIDDATA;
 
     memset(usac, 0, sizeof(*usac));
 
-- 
2.45.2



More information about the ffmpeg-devel mailing list