mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
dashdemux: Subtract the period start time from the presentation offset
We're interested in the offset between the period start timestamp and the actual media timestamp so that we can properly correct for it. The absolute presentation offset to timestamp 0 is useless as the only thing we really care about is the offset between the current fragment timestamp and the media timestamp.
This commit is contained in:
parent
95eb1aa49c
commit
626a8f0a74
1 changed files with 5 additions and 1 deletions
|
@ -3761,13 +3761,17 @@ gst_mpd_parser_get_stream_presentation_offset (GstMpdClient * client,
|
|||
guint stream_idx)
|
||||
{
|
||||
GstActiveStream *stream = NULL;
|
||||
GstStreamPeriod *stream_period = gst_mpdparser_get_stream_period (client);
|
||||
|
||||
g_return_val_if_fail (client != NULL, FALSE);
|
||||
g_return_val_if_fail (client->active_streams != NULL, FALSE);
|
||||
stream = g_list_nth_data (client->active_streams, stream_idx);
|
||||
g_return_val_if_fail (stream != NULL, FALSE);
|
||||
|
||||
return stream->presentationTimeOffset;
|
||||
if (stream->presentationTimeOffset > stream_period->start)
|
||||
return stream->presentationTimeOffset - stream_period->start;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in a new issue