qtdemux: plug leaks in cenc aux info parsing
authorPhilippe Normand <philn@igalia.com>
Thu, 18 Feb 2016 17:33:13 +0000 (18:33 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 19 Feb 2016 08:30:46 +0000 (10:30 +0200)
gst/isomp4/qtdemux.c

index a458011..63314bc 100644 (file)
@@ -3279,6 +3279,7 @@ qtdemux_parse_cenc_aux_info (GstQTDemux * qtdemux, QtDemuxStream * stream,
     }
     buf = gst_buffer_new_wrapped (data, iv_size);
     gst_structure_set (properties, "iv", GST_TYPE_BUFFER, buf, NULL);
+    gst_buffer_unref (buf);
     size = info_sizes[i];
     if (size > iv_size) {
       if (!gst_byte_reader_get_uint16_be (br, &n_subsamples)
@@ -3303,6 +3304,7 @@ qtdemux_parse_cenc_aux_info (GstQTDemux * qtdemux, QtDemuxStream * stream,
       gst_structure_set (properties,
           "subsample_count", G_TYPE_UINT, n_subsamples,
           "subsamples", GST_TYPE_BUFFER, buf, NULL);
+      gst_buffer_unref (buf);
     } else {
       gst_structure_set (properties, "subsample_count", G_TYPE_UINT, 0, NULL);
     }