diff options
author | Justin Ruggles | 2010-07-31 20:52:33 +0000 |
---|---|---|
committer | Justin Ruggles | 2010-07-31 20:52:33 +0000 |
commit | 2249a7f3127969b6088e99f9ee224c37b1788bdc (patch) | |
tree | 5f8beb5e9caf54d7245ee0afb7590e609eb6c1e7 /libavcodec/flacenc.c | |
parent | 7c29a5de2553a7229cce33faa3b5646f1764c22e (diff) |
Change max_framesize for small final frame.
Originally committed as revision 24631 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r-- | libavcodec/flacenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index dc620b10f4..9cd65e9ac0 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1272,6 +1272,12 @@ static int flac_encode_frame(AVCodecContext *avctx, uint8_t *frame, return 0; } + /* change max_framesize for small final frame */ + if (avctx->frame_size < s->frame.blocksize) { + s->max_framesize = ff_flac_get_max_frame_size(avctx->frame_size, + s->channels, 16); + } + init_frame(s); copy_samples(s, samples); |