mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
playback: Fix leak on select_streams
Since gst_event_parse_select_streams() returns newly allocated memory for stream-id(s), it should be freed explicitly. https://bugzilla.gnome.org/show_bug.cgi?id=775553
This commit is contained in:
parent
b8c78c87d2
commit
10fe0497b2
2 changed files with 14 additions and 3 deletions
|
@ -2403,8 +2403,10 @@ ghost_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
|
|||
gst_event_unref (event);
|
||||
}
|
||||
/* Finally handle the switch */
|
||||
if (streams)
|
||||
if (streams) {
|
||||
handle_stream_switch (dbin, streams, seqnum);
|
||||
g_list_free_full (streams, g_free);
|
||||
}
|
||||
ret = GST_PAD_PROBE_HANDLED;
|
||||
}
|
||||
break;
|
||||
|
@ -2450,8 +2452,10 @@ gst_decodebin3_send_event (GstElement * element, GstEvent * event)
|
|||
}
|
||||
#endif
|
||||
/* Finally handle the switch */
|
||||
if (streams)
|
||||
if (streams) {
|
||||
handle_stream_switch (dbin, streams, seqnum);
|
||||
g_list_free_full (streams, g_free);
|
||||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
return TRUE;
|
||||
|
|
|
@ -2371,7 +2371,14 @@ update_select_streams_event (GstPlayBin3 * playbin, GstEvent * event)
|
|||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
return gst_event_new_select_streams (to_use);
|
||||
event = gst_event_new_select_streams (to_use);
|
||||
|
||||
if (streams)
|
||||
g_list_free_full (streams, g_free);
|
||||
if (to_use)
|
||||
g_list_free_full (to_use, g_free);
|
||||
|
||||
return event;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue