diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2006-07-15 15:25:05 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-07-15 15:25:05 +0000 |
commit | 4965e7c58dd34f36c58807b039fd32a82cb24c40 (patch) | |
tree | 6cee3a26e6207801c2782999f9d1bdba50e9b11c /gst | |
parent | 8ad4273ac52e86e2810f155ed19698caa88c9fee (diff) |
gst/rtsp/gstrtspsrc.c: Don't try doing state changes on a NULL pointer.
Original commit message from CVS:
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_set_state):
Don't try doing state changes on a NULL pointer.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 347e1e51..fd2c476e 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -337,10 +337,12 @@ gst_rtspsrc_set_state (GstRTSPSrc * src, GstState state) stream = (GstRTSPStream *) streams->data; /* first our rtp session manager */ - if ((ret = - gst_element_set_state (stream->rtpdec, - state)) == GST_STATE_CHANGE_FAILURE) - goto done; + if (stream->rtpdec) { + if ((ret = + gst_element_set_state (stream->rtpdec, + state)) == GST_STATE_CHANGE_FAILURE) + goto done; + } /* then our sources */ if (stream->rtpsrc) { |