X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Frtsp%2Fgstrtspsrc.c;h=cc97bf75f2c18201dc9315c4e7e9ba4fdf913a63;hb=9ee320f66e2676564040240b2e71c2f30be7cd6f;hp=85875f124756eb9d1866e7a99b70db18f118cc3b;hpb=2dfe2287400c3158deb05168edfea41608fd347a;p=platform%2Fupstream%2Fgst-plugins-good.git diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 85875f1..cc97bf7 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2281,7 +2281,9 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream) for (i = 0; i < 2; i++) { if (stream->udpsrc[i]) { gst_element_set_state (stream->udpsrc[i], GST_STATE_NULL); - gst_bin_remove (GST_BIN_CAST (src), stream->udpsrc[i]); + if (gst_object_has_as_parent (GST_OBJECT (stream->udpsrc[i]), + GST_OBJECT (src))) + gst_bin_remove (GST_BIN_CAST (src), stream->udpsrc[i]); gst_object_unref (stream->udpsrc[i]); } if (stream->channelpad[i]) @@ -2289,7 +2291,9 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream) if (stream->udpsink[i]) { gst_element_set_state (stream->udpsink[i], GST_STATE_NULL); - gst_bin_remove (GST_BIN_CAST (src), stream->udpsink[i]); + if (gst_object_has_as_parent (GST_OBJECT (stream->udpsink[i]), + GST_OBJECT (src))) + gst_bin_remove (GST_BIN_CAST (src), stream->udpsink[i]); gst_object_unref (stream->udpsink[i]); } } @@ -4882,7 +4886,9 @@ gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream, if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { sent_event = gst_event_new_eos (); - gst_event_set_seqnum (sent_event, stream->segment_seqnum[1]); + if (stream->segment_seqnum[1] != GST_SEQNUM_INVALID) { + gst_event_set_seqnum (sent_event, stream->segment_seqnum[1]); + } } else { sent_event = gst_event_ref (event); }