pad: don't access unowned and possibly already freed event

Don't print the name of the event when ownership is given away.

https://bugzilla.gnome.org/show_bug.cgi?id=727484
This commit is contained in:
Linus Svensson 2014-04-01 15:38:54 +02:00 committed by Tim-Philipp Müller
parent df7bfb6a10
commit cb554772e5

View file

@ -4790,15 +4790,15 @@ gst_pad_push_event_unchecked (GstPad * pad, GstEvent * event,
GST_OBJECT_UNLOCK (pad);
GST_LOG_OBJECT (pad, "sending event %p (%s) to peerpad %" GST_PTR_FORMAT,
event, GST_EVENT_TYPE_NAME (event), peerpad);
event, gst_event_type_get_name (event_type), peerpad);
ret = gst_pad_send_event_unchecked (peerpad, event, type);
/* Note: we gave away ownership of the event at this point but we can still
* print the old pointer */
GST_LOG_OBJECT (pad,
"sent event %p (%s) to peerpad %" GST_PTR_FORMAT ", ret %s", event,
GST_EVENT_TYPE_NAME (event), peerpad, gst_flow_get_name (ret));
"sent event %p to (%s) peerpad %" GST_PTR_FORMAT ", ret %s", event,
gst_event_type_get_name (event_type), peerpad, gst_flow_get_name (ret));
gst_object_unref (peerpad);