diff options
author | Julien Moutte <julien@fluendo.com> | 2009-02-26 19:07:35 +0100 |
---|---|---|
committer | Julien Moutte <julien@fluendo.com> | 2009-02-26 19:10:41 +0100 |
commit | ec5229d75f51308abf4858769026d7c3970eaf73 (patch) | |
tree | 3abe1db71984ef91b4df7d88e36fa5c887d8ad41 /gst/avi | |
parent | 51200cad4108eb60ebd5f5a319ada463d40b455b (diff) |
avidemux: fix SEEK event handling in push mode
When in push mode we should not try to handle the SEEK event as there's
no code to handle it properly. Propagate upstream.
Diffstat (limited to 'gst/avi')
-rw-r--r-- | gst/avi/gstavidemux.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 017a7f58..adea05fd 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -619,9 +619,13 @@ gst_avi_demux_handle_src_event (GstPad * pad, GstEvent * event) switch (GST_EVENT_TYPE (event)) { case GST_EVENT_SEEK: - /* handle seeking */ - res = gst_avi_demux_handle_seek (avi, pad, event); - gst_event_unref (event); + /* handle seeking only in pull mode */ + if (!avi->streaming) { + res = gst_avi_demux_handle_seek (avi, pad, event); + gst_event_unref (event); + } else { + res = gst_pad_event_default (pad, event); + } break; case GST_EVENT_QOS: case GST_EVENT_NAVIGATION: @@ -4246,6 +4250,7 @@ gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) if (active) { avi->segment_running = TRUE; + avi->streaming = FALSE; return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop, sinkpad); } else { @@ -4257,9 +4262,11 @@ gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active) static gboolean gst_avi_demux_activate_push (GstPad * pad, gboolean active) { + GstAviDemux *avi = GST_AVI_DEMUX (GST_OBJECT_PARENT (pad)); if (active) { GST_DEBUG ("avi: activating push/chain function"); + avi->streaming = TRUE; } else { GST_DEBUG ("avi: deactivating push/chain function"); } |