mpdparser: fix memory leak in gst_mpd_client_get_next_fragment_set()

we have to free next_fragment_uri
This commit is contained in:
Gianluca Gennari 2012-10-19 12:01:03 +02:00 committed by Thiago Santos
parent cf0ab8e1f3
commit 8e9ba056d7
3 changed files with 4 additions and 3 deletions

View file

@ -1477,7 +1477,7 @@ gst_dash_demux_get_next_fragment_set (GstDashDemux * demux)
GstActiveStream *stream;
GstFragment *download, *header;
GList *fragment_set;
const gchar *next_fragment_uri;
gchar *next_fragment_uri;
GstClockTime duration;
GstClockTime timestamp;
gboolean discont;
@ -1512,6 +1512,7 @@ gst_dash_demux_get_next_fragment_set (GstDashDemux * demux)
download = gst_uri_downloader_fetch_uri (demux->downloader,
next_fragment_uri);
g_free (next_fragment_uri);
if (download == NULL)
return FALSE;

View file

@ -2750,7 +2750,7 @@ gst_mpd_client_setup_streaming (GstMpdClient * client,
gboolean
gst_mpd_client_get_next_fragment (GstMpdClient * client,
guint indexStream, gboolean *discontinuity, const gchar **uri,
guint indexStream, gboolean *discontinuity, gchar **uri,
GstClockTime *duration, GstClockTime *timestamp)
{
GstActiveStream *stream = NULL;

View file

@ -449,7 +449,7 @@ gboolean gst_mpd_client_setup_representation (GstMpdClient *client, GstActiveStr
void gst_mpd_client_get_current_position (GstMpdClient *client, GstClockTime * timestamp);
GstClockTime gst_mpd_client_get_duration (GstMpdClient *client);
GstClockTime gst_mpd_client_get_target_duration (GstMpdClient *client);
gboolean gst_mpd_client_get_next_fragment (GstMpdClient *client, guint indexStream, gboolean *discontinuity, const gchar **uri, GstClockTime *duration, GstClockTime *timestamp);
gboolean gst_mpd_client_get_next_fragment (GstMpdClient *client, guint indexStream, gboolean *discontinuity, gchar **uri, GstClockTime *duration, GstClockTime *timestamp);
gboolean gst_mpd_client_get_next_header (GstMpdClient *client, const gchar **uri, guint stream_idx);
gboolean gst_mpd_client_is_live (GstMpdClient * client);