summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-10-13 17:46:22 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-10-13 17:48:51 +0200
commitdf0335e65b2fb7113692998f370b7215c7b36dee (patch)
tree8dbc3ba9c1e0bafed15cd839ce5ec5e1a7374360
parentb134ca31fa7216d91f161196ade9a6c4018b6243 (diff)
avimux: calculate suggested buffer size
Calculate the suggested buffer size based on the largest chunk in the file. See #597847
-rw-r--r--gst/avi/gstavimux.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c
index e5bbfd5f..0602e412 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) {