mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 21:28:45 +00:00
matroskademux: Fix memory leak when parsing attachments
gst_tag_image_data_to_image_sample() does not take ownership of the passed memory, so don't set it to NULL to allow us to free it later. https://bugzilla.gnome.org/show_bug.cgi?id=775472
This commit is contained in:
parent
d3bc50bc8f
commit
7d6cf17498
1 changed files with 2 additions and 3 deletions
|
@ -625,10 +625,9 @@ gst_matroska_read_common_parse_attached_file (GstMatroskaReadCommon * common,
|
|||
tagsample =
|
||||
gst_tag_image_data_to_image_sample (data, datalen, image_type);
|
||||
|
||||
if (!tagsample)
|
||||
if (!tagsample) {
|
||||
image_type = GST_TAG_IMAGE_TYPE_NONE;
|
||||
else {
|
||||
data = NULL;
|
||||
} else {
|
||||
tagbuffer = gst_buffer_ref (gst_sample_get_buffer (tagsample));
|
||||
caps = gst_caps_ref (gst_sample_get_caps (tagsample));
|
||||
info = gst_structure_copy (gst_sample_get_info (tagsample));
|
||||
|
|
Loading…
Reference in a new issue