queue[2]: Make upstream events MT-safe

This commit is contained in:
Havard Graff 2011-03-21 16:01:05 +01:00 committed by Sebastian Dröge
parent 237e54d4fe
commit d5485786a4
2 changed files with 8 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}