dash: Correct check for valid timeShiftBufferDepth

If not set, the timeShiftBufferDepth has a default value of -1.
The standard says that this should be interpreted as infinite.

The gst_mpd_client_check_time_position function incorrectly compares
timeShiftBufferDepth with 0 instead of -1 to determine if it was set.

https://bugzilla.gnome.org/show_bug.cgi?id=751500
This commit is contained in:
Florin Apostol 2015-06-25 15:05:20 +01:00 committed by Sebastian Dröge
parent bf2f4f5c8c
commit fa9b03186a

View file

@ -4570,7 +4570,7 @@ gst_mpd_client_check_time_position (GstMpdClient * client,
*diff = ts_microseconds - stream_now; *diff = ts_microseconds - stream_now;
return 1; return 1;
} }
if (client->mpd_node->timeShiftBufferDepth if (client->mpd_node->timeShiftBufferDepth != -1
&& ts_microseconds < && ts_microseconds <
stream_now - client->mpd_node->timeShiftBufferDepth) { stream_now - client->mpd_node->timeShiftBufferDepth) {
*diff = ts_microseconds - stream_now; *diff = ts_microseconds - stream_now;