From: Wim Taymans Date: Fri, 16 Nov 2012 11:16:05 +0000 (+0100) Subject: rtspsrc: clear variables before retrying X-Git-Tag: 1.19.3~509^2~6346 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2a4d28c1fd9aea5229846db34c5a2dfc3d33ae5;p=platform%2Fupstream%2Fgstreamer.git rtspsrc: clear variables before retrying Else we might unref an old udpsrc twice in cleanup. --- diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 0292c8b..a6a8621 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1568,6 +1568,7 @@ again: GST_DEBUG_OBJECT (src, "free RTP udpsrc"); gst_element_set_state (udpsrc0, GST_STATE_NULL); gst_object_unref (udpsrc0); + udpsrc0 = NULL; GST_DEBUG_OBJECT (src, "retry %d", count); goto again; @@ -1589,6 +1590,7 @@ again: GST_DEBUG_OBJECT (src, "free RTP udpsrc"); gst_element_set_state (udpsrc0, GST_STATE_NULL); gst_object_unref (udpsrc0); + udpsrc0 = NULL; GST_DEBUG_OBJECT (src, "retry %d", count); tmp_rtp++; @@ -1619,6 +1621,7 @@ again: GST_DEBUG_OBJECT (src, "free RTP udpsrc"); gst_element_set_state (udpsrc0, GST_STATE_NULL); gst_object_unref (udpsrc0); + udpsrc0 = NULL; GST_DEBUG_OBJECT (src, "free RTCP udpsrc"); gst_element_set_state (udpsrc1, GST_STATE_NULL);