summaryrefslogtreecommitdiff
path: root/gst/asfdemux
diff options
context:
space:
mode:
authorVootele Vesterblom <vov@bang-olufsen.dk>2015-05-12 11:08:55 +0300
committerTim-Philipp Müller <tim@centricular.com>2016-05-27 17:18:32 +0100
commit6ff1c761e4de7fcbf96d21c0769766cf877f3146 (patch)
tree3aadb9f70e6013e35ce142b9ab2c314dbd2402a2 /gst/asfdemux
parentf52343fcf85d3d700e78210ff6ee07de1ea42da1 (diff)
downloadgstreamer-plugins-ugly-6ff1c761e4de7fcbf96d21c0769766cf877f3146.tar.gz
asfdemux: fix seeking back after EOS has been reached in push mode
Fix seeking when demuxer is in INDEX state. This happens when we reached the end of the stream. It should still be possible to do a flushing seek and seek back to any other position though. Instead the demuxer would just go straight to EOS again instead of going back to processing packets again from the new position. https://bugzilla.gnome.org/show_bug.cgi?id=749066
Diffstat (limited to 'gst/asfdemux')
-rw-r--r--gst/asfdemux/gstasfdemux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 27bba9c6..f65bf821 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -428,6 +428,11 @@ gst_asf_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
demux->need_newsegment = TRUE;
demux->segment_seqnum = gst_event_get_seqnum (event);
gst_asf_demux_reset_stream_state_after_discont (demux);
+ /* if we seek back after reaching EOS, go back to packet reading state */
+ if (demux->data_offset > 0 && segment->start >= demux->data_offset
+ && demux->state == GST_ASF_DEMUX_STATE_INDEX) {
+ demux->state = GST_ASF_DEMUX_STATE_DATA;
+ }
GST_OBJECT_UNLOCK (demux);
gst_event_unref (event);