gst/rtsp/gstrtspsrc.c: Check for stream pad before activating.

Original commit message from CVS:
Patch by: Lutz Mueller <lutz at topfrose dot de>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_activate_streams):
Check for stream pad before activating.
This commit is contained in:
Lutz Mueller 2007-01-11 09:30:59 +00:00 committed by Wim Taymans
parent 12ab127d12
commit cfed610d01
2 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2007-01-11 Wim Taymans <wim@fluendo.com>
Patch by: Lutz Mueller <lutz at topfrose dot de>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_activate_streams):
Check for stream pad before activating.
2007-01-10 Wim Taymans <wim@fluendo.com> 2007-01-10 Wim Taymans <wim@fluendo.com>
Patch by: Peter Kjellerstedt <pkj at axis com> Patch by: Peter Kjellerstedt <pkj at axis com>

View file

@ -1122,11 +1122,13 @@ gst_rtspsrc_activate_streams (GstRTSPSrc * src)
for (walk = src->streams; walk; walk = g_list_next (walk)) { for (walk = src->streams; walk; walk = g_list_next (walk)) {
GstRTSPStream *stream = (GstRTSPStream *) walk->data; GstRTSPStream *stream = (GstRTSPStream *) walk->data;
gst_pad_set_active (stream->srcpad, TRUE); if (stream->srcpad) {
/* add the pad */ gst_pad_set_active (stream->srcpad, TRUE);
if (!stream->added) { /* add the pad */
gst_element_add_pad (GST_ELEMENT_CAST (src), stream->srcpad); if (!stream->added) {
stream->added = TRUE; gst_element_add_pad (GST_ELEMENT_CAST (src), stream->srcpad);
stream->added = TRUE;
}
} }
} }