mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
queue[2]: Make upstream events MT-safe
This commit is contained in:
parent
237e54d4fe
commit
d5485786a4
2 changed files with 8 additions and 2 deletions
|
@ -1284,7 +1284,9 @@ static gboolean
|
|||
gst_queue_handle_src_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstQueue *queue = GST_QUEUE (GST_PAD_PARENT (pad));
|
||||
GstQueue *queue = GST_QUEUE (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (queue == NULL))
|
||||
return FALSE;
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%d)",
|
||||
|
@ -1293,6 +1295,7 @@ gst_queue_handle_src_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
res = gst_pad_push_event (queue->sinkpad, event);
|
||||
|
||||
gst_object_unref (queue);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -2364,7 +2364,9 @@ static gboolean
|
|||
gst_queue2_handle_src_event (GstPad * pad, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstQueue2 *queue = GST_QUEUE2 (GST_PAD_PARENT (pad));
|
||||
GstQueue2 *queue = GST_QUEUE2 (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (queue == NULL))
|
||||
return FALSE;
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
||||
|
@ -2415,6 +2417,7 @@ gst_queue2_handle_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (queue);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue