mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-02 18:23:56 +00:00
multiqueue: Don't leak objects when flushing after dequeueing and before pushing the object
This commit is contained in:
parent
65fbc9398a
commit
489b94444e
1 changed files with 5 additions and 1 deletions
|
@ -1075,7 +1075,7 @@ gst_multi_queue_loop (GstPad * pad)
|
||||||
GstMultiQueueItem *item;
|
GstMultiQueueItem *item;
|
||||||
GstDataQueueItem *sitem;
|
GstDataQueueItem *sitem;
|
||||||
GstMultiQueue *mq;
|
GstMultiQueue *mq;
|
||||||
GstMiniObject *object;
|
GstMiniObject *object = NULL;
|
||||||
guint32 newid;
|
guint32 newid;
|
||||||
GstFlowReturn result;
|
GstFlowReturn result;
|
||||||
|
|
||||||
|
@ -1170,6 +1170,7 @@ gst_multi_queue_loop (GstPad * pad)
|
||||||
/* Try to push out the new object */
|
/* Try to push out the new object */
|
||||||
result = gst_single_queue_push_one (mq, sq, object);
|
result = gst_single_queue_push_one (mq, sq, object);
|
||||||
sq->srcresult = result;
|
sq->srcresult = result;
|
||||||
|
object = NULL;
|
||||||
|
|
||||||
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED
|
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED
|
||||||
&& result != GST_FLOW_UNEXPECTED)
|
&& result != GST_FLOW_UNEXPECTED)
|
||||||
|
@ -1183,6 +1184,9 @@ gst_multi_queue_loop (GstPad * pad)
|
||||||
|
|
||||||
out_flushing:
|
out_flushing:
|
||||||
{
|
{
|
||||||
|
if (object)
|
||||||
|
gst_mini_object_unref (object);
|
||||||
|
|
||||||
/* Need to make sure wake up any sleeping pads when we exit */
|
/* Need to make sure wake up any sleeping pads when we exit */
|
||||||
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
|
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
|
||||||
compute_high_id (mq);
|
compute_high_id (mq);
|
||||||
|
|
Loading…
Reference in a new issue