diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-21 04:54:31 +0300 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-03-21 04:54:31 +0300 |
commit | 0fb2182d469d09623cf2ff0e4b786981f2fbafbe (patch) | |
tree | 31505ac79ed335fcb07d0de76aabccc5b1a4abea /libavcodec/flacdec.c | |
parent | f5187c7f0488722852f41249b49353c9cc856981 (diff) |
add a function to calculate a more accurate estimate for maximum FLAC
frame size and use the function in the FLAC decoder and FLAC encoder
Originally committed as revision 18092 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacdec.c')
-rw-r--r-- | libavcodec/flacdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index ec1ace4aee..8dbe8c91b4 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -147,7 +147,8 @@ static void allocate_buffers(FLACContext *s) assert(s->max_blocksize); if (s->max_framesize == 0 && s->max_blocksize) { - s->max_framesize = 23 + (s->channels * s->bps * s->max_blocksize + 7) / 8; + s->max_framesize = ff_flac_get_max_frame_size(s->max_blocksize, + s->channels, s->bps); } for (i = 0; i < s->channels; i++) { |