mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
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:
parent
cfafeaf4da
commit
160649c051
1 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue