From 2987e66f223fc1f3eafc1ade0c04fbcef758269b Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 9 Feb 2017 11:29:43 +1100 Subject: [PATCH] qtmux: Add a comment about how atom_trak_set_elst_entry() works --- gst/isomp4/gstqtmux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 8be98ba68f..feff0790b9 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -2552,6 +2552,10 @@ gst_qt_mux_update_edit_lists (GstQTMux * qtmux) media_start = gst_util_uint64_scale_round (ctts, atom_trak_get_timescale (qtpad->trak), GST_SECOND); + /* atom_trak_set_elst_entry() has a quirk - if the edit list + * is empty because there's no gap added above, this call + * will not replace index 1, it will create the entry at index 0. + * Luckily, that's exactly what we want here */ atom_trak_set_elst_entry (qtpad->trak, 1, duration, media_start, (guint32) (1 * 65536.0)); }