gst/qtdemux/qtdemux.c: Don't stop the task if the pad isn't linked.

Original commit message from CVS:
* gst/qtdemux/qtdemux.c: (gst_qtdemux_handle_src_event),
(gst_qtdemux_loop), (qtdemux_sink_activate_pull):
Don't stop the task if the pad isn't linked.
This commit is contained in:
Edward Hervey 2006-02-16 14:02:57 +00:00
parent 16775d85b1
commit 0241c68356
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2006-02-16 Edward Hervey <edward@fluendo.com>
* gst/qtdemux/qtdemux.c: (gst_qtdemux_handle_src_event),
(gst_qtdemux_loop), (qtdemux_sink_activate_pull):
Don't stop the task if the pad isn't linked.
2006-02-15 Tim-Philipp Müller <tim at centricular dot net> 2006-02-15 Tim-Philipp Müller <tim at centricular dot net>
* gst/qtdemux/qtdemux.c: (gst_qtdemux_chain): * gst/qtdemux/qtdemux.c: (gst_qtdemux_chain):

View file

@ -143,7 +143,7 @@ static void gst_qtdemux_base_init (GstQTDemuxClass * klass);
static void gst_qtdemux_init (GstQTDemux * quicktime_demux); static void gst_qtdemux_init (GstQTDemux * quicktime_demux);
static GstStateChangeReturn gst_qtdemux_change_state (GstElement * element, static GstStateChangeReturn gst_qtdemux_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static void gst_qtdemux_loop_header (GstPad * pad); static void gst_qtdemux_loop (GstPad * pad);
static GstFlowReturn gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf); static GstFlowReturn gst_qtdemux_chain (GstPad * sinkpad, GstBuffer * inbuf);
static gboolean qtdemux_sink_activate (GstPad * sinkpad); static gboolean qtdemux_sink_activate (GstPad * sinkpad);
static gboolean qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active); static gboolean qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active);
@ -427,7 +427,7 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstEvent * event)
/* and restart */ /* and restart */
gst_pad_start_task (qtdemux->sinkpad, gst_pad_start_task (qtdemux->sinkpad,
(GstTaskFunction) gst_qtdemux_loop_header, qtdemux->sinkpad); (GstTaskFunction) gst_qtdemux_loop, qtdemux->sinkpad);
GST_PAD_STREAM_UNLOCK (qtdemux->sinkpad); GST_PAD_STREAM_UNLOCK (qtdemux->sinkpad);
break; break;
@ -723,7 +723,7 @@ beach:
} }
static void static void
gst_qtdemux_loop_header (GstPad * pad) gst_qtdemux_loop (GstPad * pad)
{ {
GstQTDemux *qtdemux = GST_QTDEMUX (GST_OBJECT_PARENT (pad)); GstQTDemux *qtdemux = GST_QTDEMUX (GST_OBJECT_PARENT (pad));
guint64 cur_offset; guint64 cur_offset;
@ -746,7 +746,7 @@ gst_qtdemux_loop_header (GstPad * pad)
g_error ("State=%d", qtdemux->state); g_error ("State=%d", qtdemux->state);
} }
if (ret != GST_FLOW_OK) { if ((ret != GST_FLOW_OK) && (ret != GST_FLOW_NOT_LINKED)) {
GST_LOG_OBJECT (qtdemux, "pausing task, reason %s", GST_LOG_OBJECT (qtdemux, "pausing task, reason %s",
gst_flow_get_name (ret)); gst_flow_get_name (ret));
gst_pad_pause_task (qtdemux->sinkpad); gst_pad_pause_task (qtdemux->sinkpad);
@ -1052,8 +1052,7 @@ qtdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
if (active) { if (active) {
/* if we have a scheduler we can start the task */ /* if we have a scheduler we can start the task */
demux->pullbased = TRUE; demux->pullbased = TRUE;
gst_pad_start_task (sinkpad, gst_pad_start_task (sinkpad, (GstTaskFunction) gst_qtdemux_loop, sinkpad);
(GstTaskFunction) gst_qtdemux_loop_header, sinkpad);
} else { } else {
gst_pad_stop_task (sinkpad); gst_pad_stop_task (sinkpad);
} }