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.
This commit is contained in:
Julien Moutte 2009-02-26 19:07:35 +01:00
parent 51200cad41
commit ec5229d75f

View file

@ -619,9 +619,13 @@ gst_avi_demux_handle_src_event (GstPad * pad, GstEvent * event)
switch (GST_EVENT_TYPE (event)) { switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK: case GST_EVENT_SEEK:
/* handle seeking */ /* handle seeking only in pull mode */
if (!avi->streaming) {
res = gst_avi_demux_handle_seek (avi, pad, event); res = gst_avi_demux_handle_seek (avi, pad, event);
gst_event_unref (event); gst_event_unref (event);
} else {
res = gst_pad_event_default (pad, event);
}
break; break;
case GST_EVENT_QOS: case GST_EVENT_QOS:
case GST_EVENT_NAVIGATION: case GST_EVENT_NAVIGATION:
@ -4246,6 +4250,7 @@ gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
if (active) { if (active) {
avi->segment_running = TRUE; avi->segment_running = TRUE;
avi->streaming = FALSE;
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop, return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_avi_demux_loop,
sinkpad); sinkpad);
} else { } else {
@ -4257,9 +4262,11 @@ gst_avi_demux_sink_activate_pull (GstPad * sinkpad, gboolean active)
static gboolean static gboolean
gst_avi_demux_activate_push (GstPad * pad, gboolean active) gst_avi_demux_activate_push (GstPad * pad, gboolean active)
{ {
GstAviDemux *avi = GST_AVI_DEMUX (GST_OBJECT_PARENT (pad));
if (active) { if (active) {
GST_DEBUG ("avi: activating push/chain function"); GST_DEBUG ("avi: activating push/chain function");
avi->streaming = TRUE;
} else { } else {
GST_DEBUG ("avi: deactivating push/chain function"); GST_DEBUG ("avi: deactivating push/chain function");
} }