Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.
CC:libav-stable@libav.org
... | ... |
@@ -277,6 +277,11 @@ static av_cold int decode_init(AVCodecContext *avctx) |
277 | 277 |
int log2_max_num_subframes; |
278 | 278 |
int num_possible_block_sizes; |
279 | 279 |
|
280 |
+ if (!avctx->block_align) { |
|
281 |
+ av_log(avctx, AV_LOG_ERROR, "block_align is not set\n"); |
|
282 |
+ return AVERROR(EINVAL); |
|
283 |
+ } |
|
284 |
+ |
|
280 | 285 |
s->avctx = avctx; |
281 | 286 |
avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); |
282 | 287 |
|