dashdemux: fix default suggestedPresentationDelay

When MPD@suggestedPresentationDelay is not present in the MPD,
dashdemux can provide default suggestedPresentationDelay. However
when applying default value of suggestedPresentationDelay, the value
should be subtracted from current time, not added to it. When streams
setup is performed and live point is calculated, we have to go to the
wall clock (current time) minus suggestedPresentationDelay, if we tried
to start with current time plus suggestedPresentationDelay, we would
be asking for future stream, which has not yet been recorded. Also
the value needs to be converted from ms to us.

https://bugzilla.gnome.org/show_bug.cgi?id=764726
This commit is contained in:
Wojciech Przybyl 2016-04-01 17:42:32 +01:00 committed by Sebastian Dröge
parent e1b68d9a65
commit 8eb87ce5dc

View file

@ -823,7 +823,8 @@ gst_dash_demux_setup_streams (GstAdaptiveDemux * demux)
gint64 dfp =
gst_mpd_client_parse_default_presentation_delay (dashdemux->client,
dashdemux->default_presentation_delay);
GstDateTime *target = gst_mpd_client_add_time_difference (now, dfp);
GstDateTime *target = gst_mpd_client_add_time_difference (now,
dfp * -1000);
gst_date_time_unref (now);
now = target;
}