summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Knopp <matej.knopp@gmail.com>2013-07-30 17:28:17 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-08-08 11:56:19 +0200
commitf27c832011a96a277bcabdb0a858077a42b46ebc (patch)
tree9783fd5f7fdf6dffe0b7185545e6b1eec20e8cbe
parent68985ba2abda2775675de97a5ca6cb2e3e4c4682 (diff)
asfdemux: fix seeking in push mode
-rw-r--r--gst/asfdemux/asfpacket.c13
-rw-r--r--gst/asfdemux/gstasfdemux.c12
2 files changed, 13 insertions, 12 deletions
diff --git a/gst/asfdemux/asfpacket.c b/gst/asfdemux/asfpacket.c
index ecf1e056..8f6dc232 100644
--- a/gst/asfdemux/asfpacket.c
+++ b/gst/asfdemux/asfpacket.c
@@ -190,6 +190,19 @@ gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload,
GST_BUFFER_FLAG_SET (payload->buf, GST_BUFFER_FLAG_DISCONT);
}
+ /* remember the first queued timestamp for the segment */
+ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (demux->segment_ts) &&
+ GST_CLOCK_TIME_IS_VALID (demux->first_ts))) {
+ GST_DEBUG_OBJECT (demux, "segment ts: %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (demux->first_ts));
+ demux->segment_ts = demux->first_ts;
+ /* always note, but only determines segment when streaming */
+ if (demux->streaming)
+ gst_segment_do_seek (&demux->segment, demux->in_segment.rate,
+ GST_FORMAT_TIME, (GstSeekFlags) demux->segment.flags,
+ GST_SEEK_TYPE_SET, demux->segment_ts, GST_SEEK_TYPE_NONE, 0, NULL);
+ }
+
g_array_append_vals (stream->payloads, payload, 1);
}
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index ad1dd5d0..36402f79 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -1366,18 +1366,6 @@ gst_asf_demux_check_first_ts (GstASFDemux * demux, gboolean force)
}
}
}
-
- /* remember the first queued timestamp for the segment */
- if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (demux->segment_ts))) {
- GST_DEBUG_OBJECT (demux, "segment ts: %" GST_TIME_FORMAT,
- GST_TIME_ARGS (first_ts));
- demux->segment_ts = first_ts;
- /* always note, but only determines segment when streaming */
- if (demux->streaming)
- gst_segment_do_seek (&demux->segment, demux->in_segment.rate,
- GST_FORMAT_TIME, (GstSeekFlags) demux->segment.flags,
- GST_SEEK_TYPE_SET, demux->segment_ts, GST_SEEK_TYPE_NONE, 0, NULL);
- }
}
return TRUE;