isomp4/atoms: fix multiple stsd entries

stsd entries are serialized in reverse order (starting from
g_list_last()), and must be prepended to the entry list for their
index to be correct when referenced from stsc entries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047>
This commit is contained in:
Mathieu Duponchelle 2021-08-06 22:55:32 +02:00 committed by GStreamer Marge Bot
parent 2c6be7373f
commit e069824c7d

View file

@ -4020,7 +4020,7 @@ atom_trak_add_video_entry (AtomTRAK * trak, AtomsContext * context,
mp4v->temporal_quality = 512;
}
stsd->entries = g_list_append (stsd->entries, mp4v);
stsd->entries = g_list_prepend (stsd->entries, mp4v);
stsd->n_entries++;
return mp4v;
}