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
commitd4b70a1af925f7091771a53d58f117c46f3a140d (patch)
treeca0c61c86329ab4a304f8dd01666d98d4eebff57
parente7a01297745886464a227e4738f250e2a0861300 (diff)
downloadgst-plugins-bad-d4b70a1af925f7091771a53d58f117c46f3a140d.tar.gz
gst-plugins-bad-d4b70a1af925f7091771a53d58f117c46f3a140d.tar.bz2
gst-plugins-bad-d4b70a1af925f7091771a53d58f117c46f3a140d.zip
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",