GNOME Bugzilla – Bug 705679
dashdemux: faulty buffer timestamps when using SegmentTemplate element
Last modified: 2013-08-16 14:26:39 UTC
Created attachment 251187 [details] [review] Patch to remove incorrect timestamp scaling When using a SegmentTemplate element, the timestamps of the buffers output by dashdemux are incorrect, causing problems downstream. The reason is that GstMediaSegment start times are calculated (in gst_mpdparser_get_chunk_by_index) by multiplying segment index by segment duration and then scaling the result according the `timebase' attribute from the MPD. However, the segment duration is already a GstClockTime (i.e., it has already been scaled according to the timebase from the MPD and converted to a nanosecond value), so multiplying it by the segment index will give the correct timestamp without the need for any further scaling; and, hence, scaling it using timebase will result in an incorrect timestamp. Patch to fix this issue is attached.
Pushed as commit 19a45554bf3265018bed3f925baa0c404706a62b Thanks for your contribution!