summaryrefslogtreecommitdiff
path: root/gst/qtmux/atoms.c
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-06-10 13:24:20 +0200
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-06-19 18:13:00 +0200
commitd4b5c6ae5bc68cae524c63c72ef08ca1b5d18975 (patch)
tree2dadd66b92a868a867063bf30d817569b3c70cfe /gst/qtmux/atoms.c
parent1aeb7d9b54687d11dfe21b0637de4f53a32b1f1c (diff)
qtmux: compress/optimize stsc writing
Diffstat (limited to 'gst/qtmux/atoms.c')
-rw-r--r--gst/qtmux/atoms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c
index be578f299..d223c1292 100644
--- a/gst/qtmux/atoms.c
+++ b/gst/qtmux/atoms.c
@@ -2245,6 +2245,10 @@ stsc_entry_new (guint32 first_chunk, guint32 samples, guint32 desc_index)
static void
atom_stsc_add_new_entry (AtomSTSC * stsc, guint32 first_chunk, guint32 nsamples)
{
+ if (stsc->entries &&
+ ((STSCEntry *) stsc->entries->data)->samples_per_chunk == nsamples)
+ return;
+
stsc->entries =
g_list_prepend (stsc->entries, stsc_entry_new (first_chunk, nsamples, 1));
stsc->n_entries++;