diff mbox series

[FFmpeg-devel,04/20] avcodec/wmadec: Forward error instead of return -1

Message ID HE1PR0301MB215432C4160957127731CFF98F579@HE1PR0301MB2154.eurprd03.prod.outlook.com
State Accepted
Commit 35381d2201d794d337e34f1ddcc6cc38d7e5c238
Headers show
Series [FFmpeg-devel,01/20] avcodec/wma: Remove nonsense volatile | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt May 7, 2021, 6:46 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/wmadec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index b63ce66b23..6eec85e59a 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -70,7 +70,7 @@  static void dump_floats(WMACodecContext *s, const char *name,
 static av_cold int wma_decode_init(AVCodecContext *avctx)
 {
     WMACodecContext *s = avctx->priv_data;
-    int i, flags2;
+    int i, flags2, ret;
     uint8_t *extradata;
 
     if (!avctx->block_align) {
@@ -102,8 +102,8 @@  static av_cold int wma_decode_init(AVCodecContext *avctx)
     for (i=0; i<MAX_CHANNELS; i++)
         s->max_exponent[i] = 1.0;
 
-    if (ff_wma_init(avctx, flags2) < 0)
-        return -1;
+    if ((ret = ff_wma_init(avctx, flags2)) < 0)
+        return ret;
 
     /* init MDCT */
     for (i = 0; i < s->nb_block_sizes; i++)