GNOME Bugzilla – Bug 780410
qtdemux: distinguish TFDT with value 0 from no TFDT at all
Last modified: 2017-03-22 21:37:50 UTC
Commit https://github.com/GStreamer/gst-plugins-good/commit/1fc3d42f from bug https://bugzilla.gnome.org/show_bug.cgi?id=754230 has caused a regression in our use case (YouTube TV MSE Conformance Tests 2016, test 40. AppendOutOfOrder). It's an audio stream whose data is appended out of order (as per the test) in these batches (ranges are in seconds): [10, 20] [0, 10] [30, 40] [20, 30]. All the fragments have TFDT atoms, but the new condition added in the mentioned commit is misinterpreting a legitimate "0" value in the TFDT atom as "no TFDT atom at all".
I've thought about two possible solutions: A) Have an extra boolean parameter to qtdemux_parse_trun() hinting if the tfdt_node has been found in qtdemux_parse_moof(). Use that info in the condition added by the mentioned commit, instead of checking decode_ts != 0. I've coded this solution locally and can confirm that it solves the issue. B) Initialize decode_time to GST_CLOCK_TIME_NONE in qtdemux_parse_moof() and add a couple of extra cases in qtdemux_parse_trun() to use 0 when GST_CLOCK_TIME_NONE is passed. Except in the decode_ts != 0 condition, of course, which now would be decode_ts != GST_CLOCK_TIME_NONE. Which one do you prefer me to submit as a patch?
Created attachment 348527 [details] [review] Proposed patch I'm attaching the patch which passes the extra parameter to qtdemux_parse_trun().
Thanks! Pushed: commit 2f68f8bd891f1529474af644f4475ee516596344 Author: Enrique Ocaña González <eocanha@igalia.com> Date: Wed Mar 22 18:18:40 2017 +0000 qtdemux: distinguish TFDT with value 0 from no TFDT at all TFDTs with time 0 are being ignored since commit 1fc3d42f. They're mistaken with the case of not having TFDT, but those two cases must be distinguished in some way. This patch passes an extra boolean flag when the TFDT is present. This is now the condition being evaluated, instead of checking for 0 time. https://bugzilla.gnome.org/show_bug.cgi?id=780410