qtdemux: remove dead code trying to update stream duration
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 19 Nov 2010 11:44:18 +0000 (12:44 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 3 Dec 2010 14:52:08 +0000 (15:52 +0100)
On the one hand, it insufficiently checks whether it only updates a dummy
segment.  On the other hand, only doing this at the time the last sampled is
prepared (and sent downstream) is too little too late.

gst/qtdemux/qtdemux.c

index 8120687..8807585 100644 (file)
@@ -3059,12 +3059,6 @@ gst_qtdemux_prepare_current_sample (GstQTDemux * qtdemux,
   *duration = QTSAMPLE_DUR_PTS (stream, sample, *timestamp);
   *keyframe = QTSAMPLE_KEYFRAME (stream, sample);
 
-  /* update dummy segment duration */
-  if (stream->sample_index == stream->n_samples - 1 && stream->n_segments == 1) {
-    stream->segments[0].duration = stream->segments[0].stop_time =
-        stream->segments[0].media_stop = *timestamp + *duration;
-  }
-
   return TRUE;
 
   /* special cases */