dashdemux: fix memory leak

GPtrArray in GstActiveStream is leaked in some cases.
gst_mpdparser_free_active_stream shall be invoked to free GstActiveStream

https://bugzilla.gnome.org/show_bug.cgi?id=790899
This commit is contained in:
Jun Xie 2017-11-27 21:27:23 +08:00 committed by Thiago Santos
parent 55823ae92b
commit f31e91b7a1

View file

@ -4746,14 +4746,14 @@ gst_mpd_client_setup_streaming (GstMpdClient * client,
if (!representation) { if (!representation) {
GST_WARNING ("No valid representation in the MPD file, aborting..."); GST_WARNING ("No valid representation in the MPD file, aborting...");
g_slice_free (GstActiveStream, stream); gst_mpdparser_free_active_stream (stream);
return FALSE; return FALSE;
} }
stream->mimeType = stream->mimeType =
gst_mpdparser_representation_get_mimetype (adapt_set, representation); gst_mpdparser_representation_get_mimetype (adapt_set, representation);
if (stream->mimeType == GST_STREAM_UNKNOWN) { if (stream->mimeType == GST_STREAM_UNKNOWN) {
GST_WARNING ("Unknown mime type in the representation, aborting..."); GST_WARNING ("Unknown mime type in the representation, aborting...");
g_slice_free (GstActiveStream, stream); gst_mpdparser_free_active_stream (stream);
return FALSE; return FALSE;
} }