summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-06-06 11:18:49 (GMT)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-06-11 16:59:47 (GMT)
commitc1b42827c19bc189653845dd2740a1bcc55efc21 (patch)
tree37aab6e459d2af5a3680bb1e5d9d728be564bca7
parent55b4d8f6af3a1b582b91847e9c19269fa8b90f7d (diff)
downloadgst-plugins-base-c1b42827c19bc189653845dd2740a1bcc55efc21.tar.gz
gst-plugins-base-c1b42827c19bc189653845dd2740a1bcc55efc21.tar.xz
oggdemux: allow unset seek stop time in push mode
-rw-r--r--ext/ogg/gstoggdemux.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c
index fcb94d1..1ea27a1 100644
--- a/ext/ogg/gstoggdemux.c
+++ b/ext/ogg/gstoggdemux.c
@@ -2161,11 +2161,15 @@ gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
ogg->push_byte_offset = segment.start;
ogg->push_last_seek_offset = segment.start;
- if (gst_event_get_seqnum (event) == ogg->push_seek_seqnum)
+ if (gst_event_get_seqnum (event) == ogg->push_seek_seqnum) {
+ GstSeekType stop_type = GST_SEEK_TYPE_NONE;
+ if (ogg->push_seek_time_original_stop != -1)
+ stop_type = GST_SEEK_TYPE_SET;
gst_segment_do_seek (&ogg->segment, ogg->push_seek_rate,
GST_FORMAT_TIME, ogg->push_seek_flags, GST_SEEK_TYPE_SET,
- ogg->push_seek_time_original_target, GST_SEEK_TYPE_SET,
+ ogg->push_seek_time_original_target, stop_type,
ogg->push_seek_time_original_stop, &update);
+ }
GST_PUSH_UNLOCK (ogg);
} else {
@@ -3485,11 +3489,16 @@ gst_ogg_demux_perform_seek_push (GstOggDemux * ogg, GstEvent * event)
goto error;
}
- if (start_type != GST_SEEK_TYPE_SET || stop_type != GST_SEEK_TYPE_SET) {
+ if (start_type != GST_SEEK_TYPE_SET) {
GST_DEBUG_OBJECT (ogg, "can only seek to a SET target");
goto error;
}
+ /* If stop is unset, make sure it is -1, as this value will be tested
+ later to check whether stop is set or not */
+ if (stop_type == GST_SEEK_TYPE_NONE)
+ stop = -1;
+
if (!(flags & GST_SEEK_FLAG_FLUSH)) {
GST_DEBUG_OBJECT (ogg, "can only do flushing seeks");
goto error;