From: Blaise Gassend Date: Tue, 22 Feb 2011 12:29:26 +0000 (+0100) Subject: rtpbin: handle NULL demux elements X-Git-Tag: RELEASE-0.10.29~590 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f88181f431ddf48092230bf84ca9e0bb9315c16;p=platform%2Fupstream%2Fgst-plugins-good.git rtpbin: handle NULL demux elements When using gstrtpbin with ignore-pt=true, the free_stream function tries to call gst_element_set_locked_state and gst_element_set_state on a stream->demux which is NULL. fixes #642412 --- diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index a2f7dc423..e8d659ff0 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -1336,10 +1336,12 @@ free_stream (GstRtpBinStream * stream) g_signal_handler_disconnect (stream->buffer, stream->buffer_ptreq_sig); g_signal_handler_disconnect (stream->buffer, stream->buffer_ntpstop_sig); - gst_element_set_locked_state (stream->demux, TRUE); + if (stream->demux) + gst_element_set_locked_state (stream->demux, TRUE); gst_element_set_locked_state (stream->buffer, TRUE); - gst_element_set_state (stream->demux, GST_STATE_NULL); + if (stream->demux) + gst_element_set_state (stream->demux, GST_STATE_NULL); gst_element_set_state (stream->buffer, GST_STATE_NULL); /* now remove this signal, we need this while going to NULL because it to