wmadec: 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
(cherry picked from commit ea1136baaf
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
74880e78d8
commit
c1f479e8df
@@ -72,6 +72,11 @@ static int wma_decode_init(AVCodecContext * avctx)
|
|||||||
int i, flags2;
|
int i, flags2;
|
||||||
uint8_t *extradata;
|
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;
|
s->avctx = avctx;
|
||||||
|
|
||||||
/* extract flag infos */
|
/* extract flag infos */
|
||||||
|
Reference in New Issue
Block a user