mssdemux: fix protection data double free
authorXabier Rodriguez Calvar <calvaris@igalia.com>
Mon, 18 Mar 2019 14:23:07 +0000 (15:23 +0100)
committerXabier Rodriguez Calvar <calvaris@igalia.com>
Mon, 18 Mar 2019 14:23:07 +0000 (15:23 +0100)
For not being duplicated here it was being freed when the manifest was
being destroyed and a second time when the buffer was being destroyed.

ext/smoothstreaming/gstmssdemux.c

index 85f0ec89a7e76bbe85e494b95f64242f9d9cc713..bcea8ca0774f9c78231d92bcf728b4a5232e72c1 100644 (file)
@@ -489,7 +489,7 @@ gst_mss_demux_setup_streams (GstAdaptiveDemux * demux)
 
     if (protected) {
       GstBuffer *protection_buffer =
-          gst_buffer_new_wrapped ((gpointer) protection_data,
+          gst_buffer_new_wrapped (g_strdup (protection_data),
           strlen (protection_data));
       GstEvent *event =
           gst_event_new_protection (protection_system_id, protection_buffer,