diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-01-17 23:44:06 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2005-01-17 23:44:06 +0000 |
commit | d4b70a1af925f7091771a53d58f117c46f3a140d (patch) | |
tree | ca0c61c86329ab4a304f8dd01666d98d4eebff57 /gst | |
parent | e7a01297745886464a227e4738f250e2a0861300 (diff) | |
download | gst-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.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 10 |
1 files changed, 9 insertions, 1 deletions
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", |