mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
glviewconvert: fix a use-after-free with allocation params
_free(params) followed by a params->align is a bad idea :)
This commit is contained in:
parent
cbffe13d60
commit
af1986352b
1 changed files with 2 additions and 1 deletions
|
@ -1982,7 +1982,6 @@ _gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target)
|
||||||
gst_object_unref (allocator);
|
gst_object_unref (allocator);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gst_gl_allocation_params_free ((GstGLAllocationParams *) params);
|
|
||||||
gst_object_unref (allocator);
|
gst_object_unref (allocator);
|
||||||
|
|
||||||
meta = gst_buffer_add_video_meta_full (*target, 0,
|
meta = gst_buffer_add_video_meta_full (*target, 0,
|
||||||
|
@ -1995,6 +1994,8 @@ _gen_buffer (GstGLViewConvert * viewconvert, GstBuffer ** target)
|
||||||
if (params->valign)
|
if (params->valign)
|
||||||
gst_video_meta_set_alignment (meta, *params->valign);
|
gst_video_meta_set_alignment (meta, *params->valign);
|
||||||
|
|
||||||
|
gst_gl_allocation_params_free ((GstGLAllocationParams *) params);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue