qtdemux: Fix string memory leak

The string got using g_strdup_printf will be allocated memory
and should be freed after use.

https://bugzilla.gnome.org/show_bug.cgi?id=758161
This commit is contained in:
Vineeth TM 2015-11-16 16:56:04 +09:00 committed by Sebastian Dröge
parent 8ef6ecc244
commit 0d4e3847f0

View file

@ -12473,6 +12473,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
s = g_strdup_printf ("video/x-gst-fourcc-%s", g_strstrip (fourstr));
caps = gst_caps_new_empty_simple (s);
g_free (s);
break;
}
}
@ -12762,6 +12763,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
s = g_strdup_printf ("audio/x-gst-fourcc-%s", g_strstrip (fourstr));
caps = gst_caps_new_empty_simple (s);
g_free (s);
break;
}
}
@ -12822,6 +12824,7 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
s = g_strdup_printf ("text/x-gst-fourcc-%s", g_strstrip (fourstr));
caps = gst_caps_new_empty_simple (s);
g_free (s);
break;
}
}