提交 ec38a1ba 编写于 作者: A Andreas Cadhalpun 提交者: Michael Niedermayer

aacdec: don't return frames without data

Since commit 676a395a aac->frame->data is not necessarily allocated at
the end of aac_decode_frame_int if avctx->channels is 0.

In this case a bogus frame without any data, but non-zero nb_samples is
returned.
Signed-off-by: NAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 d3c9f1fd
......@@ -3073,6 +3073,12 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
AV_WL32(side, 2*AV_RL32(side));
}
if (!ac->frame->data[0] && samples) {
av_log(avctx, AV_LOG_ERROR, "no frame data found\n");
err = AVERROR_INVALIDDATA;
goto fail;
}
*got_frame_ptr = !!samples;
if (samples) {
ac->frame->nb_samples = samples;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册