[Bug 778426] qtdemux: Properly handle edit list in push mode
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sat Mar 31 12:41:37 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=778426
Alicia Boya García <aboya at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #370369|none |rejected
status| |
--- Comment #24 from Alicia Boya García <aboya at igalia.com> ---
Review of attachment 370369:
--> (https://bugzilla.gnome.org/review?bug=778426&attachment=370369)
This should be in a separate bug. I'm already working on this same issue by the
way.
Please upload it here instead.
https://bugzilla.gnome.org/show_bug.cgi?id=794858
::: gst/isomp4/qtdemux.c
@@ +9087,3 @@
segment->time = stime;
/* add non scaled values so we don't cause roundoff errors */
+ if (G_UNLIKELY (!duration)) {
Please avoid using !negations for time values, as intuition will bite the
reader, no matter how familiar with C they are.
(!time) is often misread as "there is no time and as such time ==
GST_CLOCK_TIME_NONE", but it actually means time != 0, which is a completely
different case.
@@ +9094,3 @@
+ qtdemux->duration > 0) {
+ /* If we can guess duration, use it */
+ stime = QTTIME_TO_GSTTIME (qtdemux, qtdemux->duration);
qtdemux->duration is not particularly reliable, as all three fields containing
durations may use (slightly) bogus values. I think it would be safer to just
use GST_CLOCK_TIME_NONE there. This value is not used for duration reporting
after all.
@@ +9118,3 @@
segment->media_start = media_start;
+ segment->media_stop = GST_CLOCK_TIME_IS_VALID (segment->duration) ?
+ segment->media_start + segment->duration : GST_CLOCK_TIME_NONE;
Good catch, that was a subtle bug.
--
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