mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
splitmuxsink: Fix some reference leaks in error cases.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1023>
This commit is contained in:
parent
b50d3b9c9f
commit
9499976fbb
1 changed files with 9 additions and 0 deletions
|
@ -1946,6 +1946,8 @@ start_next_fragment (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
|||
"Shutdown requested. Aborting fragment switch.");
|
||||
GST_SPLITMUX_LOCK (splitmux);
|
||||
GST_SPLITMUX_STATE_UNLOCK (splitmux);
|
||||
gst_object_unref (muxer);
|
||||
gst_object_unref (sink);
|
||||
return GST_FLOW_FLUSHING;
|
||||
}
|
||||
|
||||
|
@ -2092,6 +2094,9 @@ start_next_fragment (GstSplitMuxSink * splitmux, MqStreamCtx * ctx)
|
|||
return GST_FLOW_OK;
|
||||
|
||||
fail:
|
||||
gst_object_unref (sink);
|
||||
gst_object_unref (muxer);
|
||||
|
||||
GST_SPLITMUX_LOCK (splitmux);
|
||||
GST_SPLITMUX_STATE_UNLOCK (splitmux);
|
||||
GST_ELEMENT_ERROR (splitmux, RESOURCE, SETTINGS,
|
||||
|
@ -2101,6 +2106,8 @@ fail:
|
|||
fail_output:
|
||||
GST_ELEMENT_ERROR (splitmux, RESOURCE, SETTINGS,
|
||||
("Could not start new output sink"), NULL);
|
||||
gst_object_unref (sink);
|
||||
gst_object_unref (muxer);
|
||||
|
||||
GST_SPLITMUX_LOCK (splitmux);
|
||||
GST_SPLITMUX_STATE_UNLOCK (splitmux);
|
||||
|
@ -2110,6 +2117,8 @@ fail_output:
|
|||
fail_muxer:
|
||||
GST_ELEMENT_ERROR (splitmux, RESOURCE, SETTINGS,
|
||||
("Could not start new muxer"), NULL);
|
||||
gst_object_unref (sink);
|
||||
gst_object_unref (muxer);
|
||||
|
||||
GST_SPLITMUX_LOCK (splitmux);
|
||||
GST_SPLITMUX_STATE_UNLOCK (splitmux);
|
||||
|
|
Loading…
Reference in a new issue