diff options
author | Michael Smith <msmith@songbirdnest.com> | 2010-01-27 19:06:53 -0800 |
---|---|---|
committer | Michael Smith <msmith@songbirdnest.com> | 2010-02-01 16:24:39 -0800 |
commit | 80b3d80a58ae85d298b07faf86daea66d7bc0406 (patch) | |
tree | 72927fd6cf93da9bd0a4244dacf52dfe7d634364 | |
parent | 4b28a46bc701dd5fcde508a54845b4e06a601822 (diff) |
qtmux: for fixed-sample size streams (PCM audio, etc) don't allocate an enormous
buffer that we then won't use at all.
-rw-r--r-- | gst/qtmux/atoms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c index 67cf2a0bb..d62582330 100644 --- a/gst/qtmux/atoms.c +++ b/gst/qtmux/atoms.c @@ -1742,9 +1742,9 @@ atom_stsz_copy_data (AtomSTSZ * stsz, guint8 ** buffer, guint64 * size, prop_copy_uint32 (stsz->sample_size, buffer, size, offset); prop_copy_uint32 (stsz->table_size, buffer, size, offset); - /* minimize realloc */ - prop_copy_ensure_buffer (buffer, size, offset, 4 * stsz->table_size); if (stsz->sample_size == 0) { + /* minimize realloc */ + prop_copy_ensure_buffer (buffer, size, offset, 4 * stsz->table_size); /* entry count must match sample count */ g_assert (atom_array_get_len (&stsz->entries) == stsz->table_size); for (i = 0; i < atom_array_get_len (&stsz->entries); i++) { |