diff options
author | Benjamin Otte <otte@gnome.org> | 2004-02-11 08:38:26 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2004-02-11 08:38:26 +0000 |
commit | 0556f090e551cbac6b974abb90c4e32c55592f6c (patch) | |
tree | 484b8715a0ea5ee8a7e3ad2be7c1b48726deb66a /ext/ffmpeg/gstffmpegmux.c | |
parent | aedc3d17b402e465914c5de7749e5c66e68e2fff (diff) |
ext/ffmpeg/: fix memleaks
Original commit message from CVS:
2004-02-11 Benjamin Otte <in7y118@public.uni-hamburg.de>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_base_init):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_base_init):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init):
fix memleaks
Diffstat (limited to 'ext/ffmpeg/gstffmpegmux.c')
-rw-r--r-- | ext/ffmpeg/gstffmpegmux.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c index b9bce61..920c7db 100644 --- a/ext/ffmpeg/gstffmpegmux.c +++ b/ext/ffmpeg/gstffmpegmux.c @@ -114,8 +114,8 @@ gst_ffmpegmux_base_init (GstFFMpegMuxClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); + GstElementDetails details; GstFFMpegMuxClassParams *params; - GstElementDetails *details; GstPadTemplate *videosinktempl, *audiosinktempl, *srctempl; params = g_hash_table_lookup (global_plugins, @@ -126,14 +126,17 @@ gst_ffmpegmux_base_init (GstFFMpegMuxClass *klass) g_assert (params); /* construct the element details struct */ - details = g_new0 (GstElementDetails, 1); - details->longname = g_strdup_printf ("FFMPEG %s Muxer", + details.longname = g_strdup_printf ("FFMPEG %s Muxer", params->in_plugin->name); - details->klass = g_strdup ("Codec/Muxer"); - details->description = g_strdup_printf ("FFMPEG %s Muxer", + details.klass = g_strdup ("Codec/Muxer"); + details.description = g_strdup_printf ("FFMPEG %s Muxer", params->in_plugin->name); - details->author = g_strdup ("Wim Taymans <wim.taymans@chello.be>\n" - "Ronald Bultje <rbultje@ronald.bitfreak.net>"); + details.author = "Wim Taymans <wim.taymans@chello.be>, " + "Ronald Bultje <rbultje@ronald.bitfreak.net>"; + gst_element_class_set_details (element_class, &details); + g_free (details.longname); + g_free (details.klass); + g_free (details.description); /* pad templates */ srctempl = gst_pad_template_new ("sink", GST_PAD_SRC, @@ -151,7 +154,6 @@ gst_ffmpegmux_base_init (GstFFMpegMuxClass *klass) gst_element_class_add_pad_template (element_class, srctempl); gst_element_class_add_pad_template (element_class, videosinktempl); gst_element_class_add_pad_template (element_class, audiosinktempl); - gst_element_class_set_details (element_class, details); klass->in_plugin = params->in_plugin; klass->srctempl = srctempl; |