mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
gloverlay: free the image memory every time the location changes
fixes a memory leak
This commit is contained in:
parent
17fa8eac04
commit
f4afec4657
1 changed files with 5 additions and 6 deletions
|
@ -475,12 +475,11 @@ gst_gl_overlay_filter_texture (GstGLFilter * filter, guint in_tex,
|
|||
GstGLOverlay *overlay = GST_GL_OVERLAY (filter);
|
||||
|
||||
if (overlay->location_has_changed) {
|
||||
if (overlay->location == NULL) {
|
||||
if (overlay->image_memory) {
|
||||
gst_memory_unref ((GstMemory *) overlay->image_memory);
|
||||
overlay->image_memory = NULL;
|
||||
}
|
||||
} else {
|
||||
if (overlay->image_memory) {
|
||||
gst_memory_unref ((GstMemory *) overlay->image_memory);
|
||||
overlay->image_memory = NULL;
|
||||
}
|
||||
if (overlay->location != NULL) {
|
||||
if ((overlay->type_file = gst_gl_overlay_load_png (filter)) == 0) {
|
||||
if ((overlay->type_file = gst_gl_overlay_load_jpeg (filter)) == 0) {
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue