[FFmpeg-devel] [PATCH 13/17] avcodec/ac3enc_float: Remove uninformative error message

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Apr 8 00:09:11 EEST 2024


AVERROR(ENOMEM) is enough.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/ac3enc_float.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 77a7725f31..cbe87dc5fe 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -88,10 +88,8 @@ static av_cold int ac3_float_mdct_init(AC3EncodeContext *s)
 {
     const float scale = -2.0 / AC3_WINDOW_SIZE;
     float *window = av_malloc_array(AC3_BLOCK_SIZE, sizeof(*window));
-    if (!window) {
-        av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
+    if (!window)
         return AVERROR(ENOMEM);
-    }
 
     ff_kbd_window_init(window, 5.0, AC3_BLOCK_SIZE);
     s->mdct_window = window;
-- 
2.40.1



More information about the ffmpeg-devel mailing list