summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/wmaenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index abe8e4b876..d0727e69b2 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -33,6 +33,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
WMACodecContext *s = avctx->priv_data;
int i, flags1, flags2, block_align;
uint8_t *extradata;
+ int ret;
s->avctx = avctx;
@@ -83,7 +84,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (avctx->channels == 2)
s->ms_stereo = 1;
- ff_wma_init(avctx, flags2);
+ if ((ret = ff_wma_init(avctx, flags2)) < 0)
+ return ret;
/* init MDCT */
for (i = 0; i < s->nb_block_sizes; i++)