mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
rtptheoradepay: fix double frees
Fix double-frees introduced to fix another coverity report. CID 1223053
This commit is contained in:
parent
bb51ec5842
commit
054f774455
1 changed files with 7 additions and 17 deletions
|
@ -570,20 +570,16 @@ gst_rtp_theora_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (to_free);
|
|
||||||
|
|
||||||
if (rtptheoradepay->needs_keyframe)
|
if (rtptheoradepay->needs_keyframe)
|
||||||
goto request_keyframe;
|
goto request_keyframe;
|
||||||
|
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
out:
|
||||||
return NULL;
|
|
||||||
|
|
||||||
no_output:
|
no_output:
|
||||||
{
|
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
gst_rtp_buffer_unmap (&rtp);
|
||||||
g_free (to_free);
|
g_free (to_free);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
/* ERORRS */
|
/* ERORRS */
|
||||||
switch_failed:
|
switch_failed:
|
||||||
{
|
{
|
||||||
|
@ -600,9 +596,7 @@ packet_short:
|
||||||
ignore_reserved:
|
ignore_reserved:
|
||||||
{
|
{
|
||||||
GST_WARNING_OBJECT (rtptheoradepay, "reserved TDT ignored");
|
GST_WARNING_OBJECT (rtptheoradepay, "reserved TDT ignored");
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
goto out;
|
||||||
g_free (to_free);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
length_short:
|
length_short:
|
||||||
{
|
{
|
||||||
|
@ -623,9 +617,7 @@ request_config:
|
||||||
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
||||||
gst_structure_new ("GstForceKeyUnit",
|
gst_structure_new ("GstForceKeyUnit",
|
||||||
"all-headers", G_TYPE_BOOLEAN, TRUE, NULL)));
|
"all-headers", G_TYPE_BOOLEAN, TRUE, NULL)));
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
goto out;
|
||||||
g_free (to_free);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
request_keyframe:
|
request_keyframe:
|
||||||
{
|
{
|
||||||
|
@ -633,9 +625,7 @@ request_keyframe:
|
||||||
gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depayload),
|
gst_pad_push_event (GST_RTP_BASE_DEPAYLOAD_SINKPAD (depayload),
|
||||||
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
||||||
gst_structure_new_empty ("GstForceKeyUnit")));
|
gst_structure_new_empty ("GstForceKeyUnit")));
|
||||||
gst_rtp_buffer_unmap (&rtp);
|
goto out;
|
||||||
g_free (to_free);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue