# HG changeset patch # User jbr # Date 1280609553 0 # Node ID 18c7965807bf6cd6495a77e5aa8dcf66328591f3 # Parent 6644e439130d16af777a6274845c98ed2355b709 Change max_framesize for small final frame. diff -r 6644e439130d -r 18c7965807bf flacenc.c --- a/flacenc.c Sat Jul 31 20:32:12 2010 +0000 +++ b/flacenc.c Sat Jul 31 20:52:33 2010 +0000 @@ -1272,6 +1272,12 @@ 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);