rtpbasepayload: fix possible segment event leak

Need to clear it when shutting down, not when starting up.
Fixes leak in rtp-payloading unit test.
This commit is contained in:
Tim-Philipp Müller 2015-07-07 15:05:59 +01:00
parent 9dc463346e
commit fbf2773b2e

View file

@ -862,7 +862,6 @@ gst_rtp_base_depayload_change_state (GstElement * element,
priv->next_seqnum = -1;
priv->negotiated = FALSE;
priv->discont = FALSE;
gst_event_replace (&filter->priv->segment_event, NULL);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
break;
@ -877,6 +876,7 @@ gst_rtp_base_depayload_change_state (GstElement * element,
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_caps_replace (&priv->last_caps, NULL);
gst_event_replace (&priv->segment_event, NULL);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
break;