diff mbox series

[FFmpeg-devel,06/14] avcodec/huffyuvenc: Don't second-guess error code

Message ID GV1P250MB0737B1F009660C3A53B4CF528F589@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 9ec50660ad49ddb92fcbf43c61a6871cf1170f71
Headers show
Series [FFmpeg-devel,01/14] avcodec/ylc: Remove inclusion of huffyuvdsp.h | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 2, 2022, 12:06 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/huffyuvenc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 8867de0d44..84ab7f423a 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -391,9 +391,9 @@  static av_cold int encode_init(AVCodecContext *avctx)
                 s->stats[i][j]= 0;
     }
 
-    if (ff_huffyuv_alloc_temp(s)) {
-        return AVERROR(ENOMEM);
-    }
+    ret = ff_huffyuv_alloc_temp(s);
+    if (ret < 0)
+        return ret;
 
     s->picture_number=0;