git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ba40eb
)
wmadec: require block_align to be set.
author
Anton Khirnov
<anton@khirnov.net>
Wed, 6 Mar 2013 08:58:00 +0000
(09:58 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 8 Mar 2013 07:12:03 +0000
(08:12 +0100)
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
libavcodec/wmadec.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmadec.c
b/libavcodec/wmadec.c
index
14a1521
..
dbefbe0
100644
(file)
--- a/
libavcodec/wmadec.c
+++ b/
libavcodec/wmadec.c
@@
-72,6
+72,11
@@
static int wma_decode_init(AVCodecContext * avctx)
int i, flags2;
uint8_t *extradata;
+ if (!avctx->block_align) {
+ av_log(avctx, AV_LOG_ERROR, "block_align is not set\n");
+ return AVERROR(EINVAL);
+ }
+
s->avctx = avctx;
/* extract flag infos */