From 1d8482c0c68f3a19d78e26d193497380f08ccfad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ren=C3=A9=20Stadler?= Date: Thu, 24 Mar 2011 22:10:43 +0200 Subject: [PATCH] mpegtsdemux: don't leak pad name As seen on bug #645502. --- gst/mpegdemux/gstmpegtsdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index cb0d89c..fa5b41b 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -1456,10 +1456,13 @@ gst_mpegts_stream_parse_pmt (GstMpegTSStream * stream, /* not really an ES, so use section filter not pes filter */ /* initialise section filter */ GstCaps *caps; + gchar name[13]; + + g_snprintf (name, sizeof (name), "private_%04x", entry.PID); gst_section_filter_init (&ES_stream->section_filter); ES_stream->PID_type = PID_TYPE_PRIVATE_SECTION; ES_stream->pad = gst_pad_new_from_static_template (&private_template, - g_strdup_printf ("private_%04x", entry.PID)); + name); gst_pad_set_active (ES_stream->pad, TRUE); caps = gst_caps_new_simple ("application/x-mpegts-private-section", NULL); -- 2.7.4