提交 a135bea5 编写于 作者: J Justin Ruggles

skip incomplete frames

Originally committed as revision 10497 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 3df88093
......@@ -1120,6 +1120,12 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
avctx->sample_rate = ctx->sampling_rate;
avctx->bit_rate = ctx->bit_rate;
/* check that reported frame size fits in input buffer */
if(ctx->frame_size > buf_size) {
av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
return -1;
}
/* channel config */
ctx->out_channels = ctx->nchans;
if (avctx->channels == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册