Commit 468e1f9a authored by jbr's avatar jbr

skip incomplete frames

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10497 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b09d62b9
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment