changeset 12330:18c7965807bf libavcodec

Change max_framesize for small final frame.
author jbr
date Sat, 31 Jul 2010 20:52:33 +0000
parents 6644e439130d
children 784ddf9d158a
files flacenc.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);