mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
basesink: fix a use after free case
The event may be disposed while being pushed, so we make sure the debug infrastructure won't use it after the gst_pad_push().
This commit is contained in:
parent
ed57611c4f
commit
44264ae870
1 changed files with 3 additions and 2 deletions
|
@ -4429,6 +4429,8 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event)
|
|||
}
|
||||
|
||||
if (forward) {
|
||||
GST_DEBUG_OBJECT (basesink, "sending event %p %" GST_PTR_FORMAT, event,
|
||||
event);
|
||||
result = gst_pad_push_event (pad, event);
|
||||
} else {
|
||||
/* not forwarded, unref the event */
|
||||
|
@ -4437,8 +4439,7 @@ gst_base_sink_send_event (GstElement * element, GstEvent * event)
|
|||
|
||||
gst_object_unref (pad);
|
||||
|
||||
GST_DEBUG_OBJECT (basesink, "handled event %p %" GST_PTR_FORMAT ": %d", event,
|
||||
event, result);
|
||||
GST_DEBUG_OBJECT (basesink, "handled event: %d", result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue