[gst-cvs] gst-plugins-good: avimux: calculate suggested buffer size
Wim Taymans
wtay at kemper.freedesktop.org
Tue Oct 13 08:49:22 PDT 2009
Module: gst-plugins-good
Branch: master
Commit: df0335e65b2fb7113692998f370b7215c7b36dee
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=df0335e65b2fb7113692998f370b7215c7b36dee
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Tue Oct 13 17:46:22 2009 +0200
avimux: calculate suggested buffer size
Calculate the suggested buffer size based on the largest chunk in the file.
See #597847
---
gst/avi/gstavimux.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index e5bbfd5..0602e41 100644
--- a/gst/avi/gstavimux.c
+++ b/gst/avi/gstavimux.c
@@ -1803,6 +1803,10 @@ gst_avi_mux_do_buffer (GstAviMux * avimux, GstAviPad * avipad)
}
if (avipad->is_video) {
+ /* the suggested buffer size is the max frame size */
+ if (avipad->hdr.bufsize < GST_BUFFER_SIZE (data))
+ avipad->hdr.bufsize = GST_BUFFER_SIZE (data);
+
avimux->total_frames++;
if (avimux->is_bigfile) {
More information about the Gstreamer-commits
mailing list