[Bug 764637] qtdemux: Ensure stream duration by using stts box

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Apr 8 20:03:24 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=764637

--- Comment #4 from Thiago Sousa Santos <thiagossantos at gmail.com> ---
Review of attachment 325420:
 --> (https://bugzilla.gnome.org/review?bug=764637&attachment=325420)

Adding this has the downside of increasing startup time as we loop over the
stts table. I'm not sure it is worth doing this double check.

That said, most stts entries are very short as the frames have a constant
duration but also most files should have a correct duration field in the track
headers.
If we do this, perhaps we should set an upper bound to only do this check if
the stts is small enough to avoid delaying startup too much?

::: gst/isomp4/qtdemux.c
@@ +7646,3 @@
+      stream->stts_total_duration += (guint64) (samples * duration);
+    }
+    gst_byte_reader_set_pos (&stream->stts, pos);

shouldn't this be inside the block as well?

Also maybe put this all in a separate function with a clear name to give a hint
to code readers on what it is doing.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list