mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
queue[2]: Unref events if the parent element disappeared
This commit is contained in:
parent
d5485786a4
commit
1dac816e9c
2 changed files with 8 additions and 4 deletions
|
@ -1285,9 +1285,11 @@ gst_queue_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
GstQueue *queue = GST_QUEUE (gst_pad_get_parent (pad));
|
GstQueue *queue = GST_QUEUE (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (queue == NULL))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
|
if (G_UNLIKELY (queue == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%d)",
|
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%d)",
|
||||||
event, GST_EVENT_TYPE (event));
|
event, GST_EVENT_TYPE (event));
|
||||||
|
|
|
@ -2365,9 +2365,11 @@ gst_queue2_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
GstQueue2 *queue = GST_QUEUE2 (gst_pad_get_parent (pad));
|
GstQueue2 *queue = GST_QUEUE2 (gst_pad_get_parent (pad));
|
||||||
if (G_UNLIKELY (queue == NULL))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
|
if (G_UNLIKELY (queue == NULL)) {
|
||||||
|
gst_event_unref (event);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "got event %p (%s)",
|
||||||
event, GST_EVENT_TYPE_NAME (event));
|
event, GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
Loading…
Reference in a new issue