changeset 28928:f2b3f28982b8

Avoid ridiculously small decode_buffer_size (e.g. 4 with acodec=pcm_s16le) that can make -oac lavc unusable.
author reimar
date Sun, 15 Mar 2009 16:37:06 +0000
parents 8f7c8a1cb8b7
children 88c464b7fd60
files libmpcodecs/ae_lavc.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ae_lavc.c	Sun Mar 15 16:12:05 2009 +0000
+++ b/libmpcodecs/ae_lavc.c	Sun Mar 15 16:37:06 2009 +0000
@@ -248,6 +248,7 @@
 	}
 
 	encoder->decode_buffer_size = lavc_actx->frame_size * 2 * encoder->params.channels;
+	while (encoder->decode_buffer_size < 1024) encoder->decode_buffer_size *= 2;
 	encoder->bind = bind_lavc;
 	encoder->get_frame_size = get_frame_size;
 	encoder->encode = encode_lavc;