summaryrefslogtreecommitdiffstats
path: root/gst/rtsp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-06-27 11:04:47 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-06-27 11:04:47 +0000
commitcf20f497cc48191c384db59cf20494e8a87fed3e (patch)
tree5a2ca55fc9e76286872408faf74a6c7ab5b0b620 /gst/rtsp
parentd422a05194dfafd70283cf922725d9aa0836ad3b (diff)
gst/rtsp/gstrtspsrc.*: For container formats we only need to activate one of the streams so that we correctly signal ...
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_create_stream), (new_session_pad), (gst_rtspsrc_setup_streams): * gst/rtsp/gstrtspsrc.h: For container formats we only need to activate one of the streams so that we correctly signal no-more-pads. Fixes #451015.
Diffstat (limited to 'gst/rtsp')
-rw-r--r--gst/rtsp/gstrtspsrc.c6
-rw-r--r--gst/rtsp/gstrtspsrc.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 078c8d86..54bd15b8 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -516,6 +516,7 @@ gst_rtspsrc_create_stream (GstRTSPSrc * src, SDPMessage * sdp, gint idx)
* the element. */
stream->last_ret = GST_FLOW_NOT_LINKED;
stream->added = FALSE;
+ stream->disabled = FALSE;
stream->id = src->numstreams++;
/* we must have a payload. No payload means we cannot create caps */
@@ -1406,7 +1407,9 @@ new_session_pad (GstElement * session, GstPad * pad, GstRTSPSrc * src)
all_added = TRUE;
for (lstream = src->streams; lstream; lstream = g_list_next (lstream)) {
stream = (GstRTSPStream *) lstream->data;
- if (!stream->added) {
+ /* a container stream only needs one pad added. Also disabled streams don't
+ * count */
+ if (!stream->container && !stream->disabled && !stream->added) {
all_added = FALSE;
break;
}
@@ -3155,6 +3158,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
if (!src->extension->configure_stream (src->extension, stream)) {
GST_DEBUG_OBJECT (src, "skipping stream %p, disabled by extension",
stream);
+ stream->disabled = TRUE;
continue;
}
}
diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h
index caf9efe9..d51e99cf 100644
--- a/gst/rtsp/gstrtspsrc.h
+++ b/gst/rtsp/gstrtspsrc.h
@@ -88,6 +88,7 @@ struct _GstRTSPStream {
GstPad *srcpad;
GstFlowReturn last_ret;
gboolean added;
+ gboolean disabled;
/* for interleaved mode */
guint8 channel[2];