id3tag: fix sample memory leak
When getting sample from taglist, the memory is not being freed resulting in memory leak. https://bugzilla.gnome.org/show_bug.cgi?id=756070
This commit is contained in:
parent
cb20105aa5
commit
43ce0c3142
@ -498,8 +498,10 @@ add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list,
|
|||||||
guint8 *data;
|
guint8 *data;
|
||||||
gint size;
|
gint size;
|
||||||
|
|
||||||
if (!gst_buffer_map (buf, &mapinfo, GST_MAP_READ))
|
if (!gst_buffer_map (buf, &mapinfo, GST_MAP_READ)) {
|
||||||
|
gst_sample_unref (sample);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
size = mapinfo.size;
|
size = mapinfo.size;
|
||||||
data = mapinfo.data;
|
data = mapinfo.data;
|
||||||
@ -526,6 +528,7 @@ add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list,
|
|||||||
"version");
|
"version");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
gst_sample_unref (sample);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -777,6 +780,7 @@ add_image_tag (GstId3v2Tag * id3v2tag, const GstTagList * list,
|
|||||||
} else {
|
} else {
|
||||||
GST_WARNING ("no image or caps: %p, caps=%" GST_PTR_FORMAT, image, caps);
|
GST_WARNING ("no image or caps: %p, caps=%" GST_PTR_FORMAT, image, caps);
|
||||||
}
|
}
|
||||||
|
gst_sample_unref (sample);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user