rtspsrc: clear variables before retrying
Else we might unref an old udpsrc twice in cleanup.
This commit is contained in:
parent
cc9cb26be1
commit
e2a4d28c1f
@ -1568,6 +1568,7 @@ again:
|
|||||||
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
||||||
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
||||||
gst_object_unref (udpsrc0);
|
gst_object_unref (udpsrc0);
|
||||||
|
udpsrc0 = NULL;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "retry %d", count);
|
GST_DEBUG_OBJECT (src, "retry %d", count);
|
||||||
goto again;
|
goto again;
|
||||||
@ -1589,6 +1590,7 @@ again:
|
|||||||
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
||||||
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
||||||
gst_object_unref (udpsrc0);
|
gst_object_unref (udpsrc0);
|
||||||
|
udpsrc0 = NULL;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "retry %d", count);
|
GST_DEBUG_OBJECT (src, "retry %d", count);
|
||||||
tmp_rtp++;
|
tmp_rtp++;
|
||||||
@ -1619,6 +1621,7 @@ again:
|
|||||||
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
GST_DEBUG_OBJECT (src, "free RTP udpsrc");
|
||||||
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
gst_element_set_state (udpsrc0, GST_STATE_NULL);
|
||||||
gst_object_unref (udpsrc0);
|
gst_object_unref (udpsrc0);
|
||||||
|
udpsrc0 = NULL;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "free RTCP udpsrc");
|
GST_DEBUG_OBJECT (src, "free RTCP udpsrc");
|
||||||
gst_element_set_state (udpsrc1, GST_STATE_NULL);
|
gst_element_set_state (udpsrc1, GST_STATE_NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user