If we need different size, Make a copy, work with that and free it.
return NULL;
}
if (size < sizeof (gst_riff_strf_vids)) {
- vids =
- (gst_riff_strf_vids *) g_realloc (vids,
- sizeof (gst_riff_strf_vids));
+ vids = g_new (gst_riff_strf_vids, 1);
+ memcpy (vids, data, size);
}
/* little-endian -> byte-order */
if (buf)
gst_buffer_unref (buf);
+
+ if (vids != (gst_riff_strf_vids *) data)
+ g_free (vids);
}
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_UNCOMPRESSED)) {
guint32 fourcc = 0;