summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-17 23:44:06 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-17 23:44:06 +0000
commit28215a31c1c4f531cdcbbf6e3e3d26c44a014515 (patch)
tree0afaf72ed9b07ae3662f7cf83ce7ffbb45e0c929
parent04e02014d7a163588b39713caca88a98154c2b17 (diff)
gst/qtdemux/qtdemux.c: Fix two memleaks.
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (gst_qtdemux_add_stream): Fix two memleaks.
-rw-r--r--ChangeLog6
-rw-r--r--gst/qtdemux/qtdemux.c10
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4828c945..f4abfc35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-01-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state),
+ (gst_qtdemux_add_stream):
+ Fix two memleaks.
+
+2005-01-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* ext/faad/gstfaad.c: (gst_faad_srcgetcaps):
Argh...
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 22cb1fc9..73893ad0 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -529,6 +529,10 @@ gst_qtdemux_change_state (GstElement * element)
qtdemux->need_discont = FALSE;
qtdemux->need_flush = FALSE;
gst_bytestream_destroy (qtdemux->bs);
+ if (qtdemux->tag_list) {
+ gst_tag_list_free (qtdemux->tag_list);
+ qtdemux->tag_list = NULL;
+ }
break;
case GST_STATE_READY_TO_NULL:
break;
@@ -794,6 +798,8 @@ gst_qtdemux_loop_header (GstElement * element)
void
gst_qtdemux_add_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
{
+ gchar *caps;
+
if (stream->subtype == GST_MAKE_FOURCC ('v', 'i', 'd', 'e')) {
gchar *name = g_strdup_printf ("video_%02d", qtdemux->n_video_streams);
@@ -839,7 +845,9 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux, QtDemuxStream * stream)
gst_pad_set_formats_function (stream->pad, gst_qtdemux_get_src_formats);
gst_pad_set_convert_function (stream->pad, gst_qtdemux_src_convert);
- GST_DEBUG ("setting caps %s\n", gst_caps_to_string (stream->caps));
+ caps = gst_caps_to_string (stream->caps);
+ GST_DEBUG ("setting caps %s", caps);
+ g_free (caps);
gst_pad_set_explicit_caps (stream->pad, stream->caps);
GST_DEBUG ("adding pad %s %p to qtdemux %p",