mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
splitmuxsink: Fix memory leak
Fix a leak of the buffer info struct when reaching EOS without data on the reference input. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2751>
This commit is contained in:
parent
ebd8bd8f13
commit
ab459f0528
1 changed files with 7 additions and 3 deletions
|
@ -3202,9 +3202,7 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
|
|||
if (g_queue_is_empty (&splitmux->pending_input_gops)) {
|
||||
GST_WARNING_OBJECT (pad,
|
||||
"Reference was closed without GOP, dropping");
|
||||
GST_SPLITMUX_UNLOCK (splitmux);
|
||||
GST_PAD_PROBE_INFO_FLOW_RETURN (info) = GST_FLOW_EOS;
|
||||
return GST_PAD_PROBE_DROP;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
check_completed_gop (splitmux, ctx);
|
||||
|
@ -3255,6 +3253,12 @@ beach:
|
|||
mq_stream_buf_free (buf_info);
|
||||
GST_PAD_PROBE_INFO_FLOW_RETURN (info) = ret;
|
||||
return GST_PAD_PROBE_PASS;
|
||||
drop:
|
||||
GST_SPLITMUX_UNLOCK (splitmux);
|
||||
if (buf_info)
|
||||
mq_stream_buf_free (buf_info);
|
||||
GST_PAD_PROBE_INFO_FLOW_RETURN (info) = GST_FLOW_EOS;
|
||||
return GST_PAD_PROBE_DROP;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue