sdp: Store a copy of the bandwidth string

Otherwise we will free a string later that does not belong to us.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=698888
This commit is contained in:
Sebastian Rasmussen 2013-04-25 21:10:04 +02:00 committed by Sebastian Dröge
parent c72aefb620
commit f7e879aa18

View file

@ -1180,7 +1180,7 @@ gst_sdp_message_add_bandwidth (GstSDPMessage * msg, const gchar * bwtype,
{ {
GstSDPBandwidth bw; GstSDPBandwidth bw;
bw.bwtype = (gchar *) bwtype; bw.bwtype = g_strdup (bwtype);
bw.bandwidth = bandwidth; bw.bandwidth = bandwidth;
return gst_sdp_message_insert_bandwidth (msg, -1, &bw); return gst_sdp_message_insert_bandwidth (msg, -1, &bw);