Commit cc8538ff authored by Justin Ruggles's avatar Justin Ruggles

ac3dec: return smaller of buf_size and frame_size instead of always returning

frame_size.

Originally committed as revision 22950 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 84368aa6
...@@ -1420,7 +1420,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, ...@@ -1420,7 +1420,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
out_samples += 256 * s->out_channels; out_samples += 256 * s->out_channels;
} }
*data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t); *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t);
return s->frame_size; return FFMIN(buf_size, s->frame_size);
} }
/** /**
......
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