diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-03-06 09:58:00 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 08:12:16 +0100 |
commit | cacad1c058f66558ec727faac3b277d2dee264d4 (patch) | |
tree | 752c27405746250a10fe2a777849a6e8ce40668c /libavcodec/wmaprodec.c | |
parent | ea1136baafb1fe271cb56c3f4d7bff0267e3c70f (diff) | |
download | ffmpeg-cacad1c058f66558ec727faac3b277d2dee264d4.tar.gz |
wmaprodec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r-- | libavcodec/wmaprodec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 66f27c86f3..d906f900f4 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -277,6 +277,11 @@ static av_cold int decode_init(AVCodecContext *avctx) int log2_max_num_subframes; int num_possible_block_sizes; + if (!avctx->block_align) { + av_log(avctx, AV_LOG_ERROR, "block_align is not set\n"); + return AVERROR(EINVAL); + } + s->avctx = avctx; avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); |