[FFmpeg-cvslog] wmaprodec: require block_align to be set.
Anton Khirnov
git at videolan.org
Thu Mar 14 04:47:34 CET 2013
ffmpeg | branch: release/1.1 | Anton Khirnov <anton at khirnov.net> | Wed Mar 6 09:58:00 2013 +0100| [20373a66ec68d958c266f643a7d0e5ec254c0fcc] | committer: Reinhard Tartler
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 at libav.org
(cherry picked from commit cacad1c058f66558ec727faac3b277d2dee264d4)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20373a66ec68d958c266f643a7d0e5ec254c0fcc
---
libavcodec/wmaprodec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index ff96788..efc8fce 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -280,6 +280,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;
ff_dsputil_init(&s->dsp, avctx);
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
More information about the ffmpeg-cvslog
mailing list