dash: Correct check for valid timeShiftBufferDepth
authorFlorin Apostol <florin.apostol@oregan.net>
Thu, 25 Jun 2015 14:05:20 +0000 (15:05 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 25 Jun 2015 14:27:18 +0000 (16:27 +0200)
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

ext/dash/gstmpdparser.c

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