gst/flv/gstflvparse.c: Don't strdup (and thus leak) codec name strings when passing them to gst_tag_list_add().

Original commit message from CVS:
* gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
(gst_flv_parse_tag_video):
Don't strdup (and thus leak) codec name strings when passing
them to gst_tag_list_add().
This commit is contained in:
Tim-Philipp Müller 2007-12-11 11:54:43 +00:00
parent 8b973428f3
commit b23e28b2f2
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2007-12-11 Tim-Philipp Müller <tim at centricular dot net>
* gst/flv/gstflvparse.c: (gst_flv_parse_tag_audio),
(gst_flv_parse_tag_video):
Don't strdup (and thus leak) codec name strings when passing
them to gst_tag_list_add().
2007-12-10 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_class_init),

View file

@ -494,7 +494,7 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
if (demux->taglist == NULL)
demux->taglist = gst_tag_list_new ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, g_strdup (codec_name), NULL);
GST_TAG_AUDIO_CODEC, codec_name, NULL);
}
GST_DEBUG_OBJECT (demux, "created audio pad with caps %" GST_PTR_FORMAT,
@ -577,7 +577,7 @@ gst_flv_parse_tag_audio (GstFLVDemux * demux, const guint8 * data,
if (demux->taglist == NULL)
demux->taglist = gst_tag_list_new ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_AUDIO_CODEC, g_strdup (codec_name), NULL);
GST_TAG_AUDIO_CODEC, codec_name, NULL);
}
gst_caps_unref (caps);
@ -767,7 +767,7 @@ gst_flv_parse_tag_video (GstFLVDemux * demux, const guint8 * data,
if (demux->taglist == NULL)
demux->taglist = gst_tag_list_new ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_VIDEO_CODEC, g_strdup (codec_name), NULL);
GST_TAG_VIDEO_CODEC, codec_name, NULL);
}
/* Store the caps we have set */
@ -839,7 +839,7 @@ gst_flv_parse_tag_video (GstFLVDemux * demux, const guint8 * data,
if (demux->taglist == NULL)
demux->taglist = gst_tag_list_new ();
gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE,
GST_TAG_VIDEO_CODEC, g_strdup (codec_name), NULL);
GST_TAG_VIDEO_CODEC, codec_name, NULL);
}
/* Store the caps we have set */