mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
dashdemux: 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. https://bugzilla.gnome.org/show_bug.cgi?id=705679
This commit is contained in:
parent
0a6ca026d1
commit
19a45554bf
1 changed files with 0 additions and 3 deletions
|
@ -3026,8 +3026,6 @@ gst_mpdparser_get_chunk_by_index (GstMpdClient * client, guint indexStream,
|
|||
segment->duration = list_segment->duration;
|
||||
} else {
|
||||
GstClockTime duration;
|
||||
guint timescale =
|
||||
stream->cur_seg_template->MultSegBaseType->SegBaseType->timescale;
|
||||
g_return_val_if_fail (stream->cur_seg_template->MultSegBaseType->
|
||||
SegmentTimeline == NULL, FALSE);
|
||||
/* segment template generator */
|
||||
|
@ -3039,7 +3037,6 @@ gst_mpdparser_get_chunk_by_index (GstMpdClient * client, guint indexStream,
|
|||
|
||||
segment->number = indexChunk;
|
||||
segment->start_time = duration * indexChunk;
|
||||
segment->start_time = segment->start_time * timescale / GST_SECOND;
|
||||
segment->duration = duration;
|
||||
segment->SegmentURL = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue