dashdemux: Don't increase current position if we just downloaded the moof in KEYUNIT...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 6 Mar 2017 12:27:20 +0000 (14:27 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 18 May 2017 17:04:57 +0000 (19:04 +0200)
ext/dash/gstdashdemux.c

index 64dddbd..c7f32d7 100644 (file)
@@ -1792,7 +1792,10 @@ gst_dash_demux_stream_advance_fragment (GstAdaptiveDemuxStream * stream)
         && GST_ADAPTIVE_DEMUX_IN_TRICKMODE_KEY_UNITS (dashdemux)) {
       GST_LOG_OBJECT (stream->pad, "current sync sample #%d",
           dashstream->current_sync_sample);
-      dur = dashstream->keyframe_average_distance;
+      if (dashstream->current_sync_sample == -1)
+        dur = 0;
+      else
+        dur = dashstream->keyframe_average_distance;
     } else if (gst_mpd_client_has_isoff_ondemand_profile (dashdemux->client) &&
         dashstream->sidx_position != 0
         && dashstream->sidx_position != GST_CLOCK_TIME_NONE