rtp/theorapay: remove unnecessary NULL checks before g_free()
This commit is contained in:
parent
5d23dfdabf
commit
5367b26653
@ -164,8 +164,7 @@ gst_rtp_theora_pay_cleanup (GstRtpTheoraPay * rtptheorapay)
|
|||||||
gst_rtp_theora_pay_clear_packet (rtptheorapay);
|
gst_rtp_theora_pay_clear_packet (rtptheorapay);
|
||||||
g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref);
|
g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref);
|
||||||
rtptheorapay->headers = NULL;
|
rtptheorapay->headers = NULL;
|
||||||
if (rtptheorapay->config_data)
|
g_free (rtptheorapay->config_data);
|
||||||
g_free (rtptheorapay->config_data);
|
|
||||||
rtptheorapay->config_data = NULL;
|
rtptheorapay->config_data = NULL;
|
||||||
rtptheorapay->last_config = GST_CLOCK_TIME_NONE;
|
rtptheorapay->last_config = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
@ -516,8 +515,7 @@ gst_rtp_theora_pay_finish_headers (GstRTPBasePayload * basepayload)
|
|||||||
configuration = g_base64_encode (config, configlen);
|
configuration = g_base64_encode (config, configlen);
|
||||||
|
|
||||||
/* store for later re-sending */
|
/* store for later re-sending */
|
||||||
if (rtptheorapay->config_data)
|
g_free (rtptheorapay->config_data);
|
||||||
g_free (rtptheorapay->config_data);
|
|
||||||
rtptheorapay->config_size = configlen - 4 - 3 - 2;
|
rtptheorapay->config_size = configlen - 4 - 3 - 2;
|
||||||
rtptheorapay->config_data = g_malloc (rtptheorapay->config_size);
|
rtptheorapay->config_data = g_malloc (rtptheorapay->config_size);
|
||||||
rtptheorapay->config_extra_len = extralen;
|
rtptheorapay->config_extra_len = extralen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user