qtmux: compress/optimize stsc writing

This commit is contained in:
Mark Nauwelaerts 2009-06-10 13:24:20 +02:00 committed by Tim-Philipp Müller
parent 7c9a6093d8
commit 579a7edb3a

View file

@ -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++;