mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
gst-play: fix memory leak
In gst-play, for GST_MESSAGE_ELEMENT bus message, event is being allocated through gst_navigation_message_parse_event, but not freed. https://bugzilla.gnome.org/show_bug.cgi?id=752040
This commit is contained in:
parent
923d72d399
commit
9efa9dfcc8
1 changed files with 3 additions and 1 deletions
|
@ -391,7 +391,7 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data)
|
|||
{
|
||||
GstNavigationMessageType mtype = gst_navigation_message_get_type (msg);
|
||||
if (mtype == GST_NAVIGATION_MESSAGE_EVENT) {
|
||||
GstEvent *ev;
|
||||
GstEvent *ev = NULL;
|
||||
|
||||
if (gst_navigation_message_parse_event (msg, &ev)) {
|
||||
GstNavigationEventType e_type = gst_navigation_event_get_type (ev);
|
||||
|
@ -439,6 +439,8 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (ev)
|
||||
gst_event_unref (ev);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue