mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 11:08:34 +00:00
libs: surface: initialize VASurfaceAttribExternalBuffers
Initialize VASurfaceAttribExternalBuffers using compiler's syntax rather than using memset().
This commit is contained in:
parent
bb72efb2e7
commit
9bb65e4c10
1 changed files with 2 additions and 3 deletions
|
@ -140,7 +140,7 @@ gst_vaapi_surface_init_full (GstVaapiSurface * surface,
|
||||||
guint chroma_type, va_chroma_format, i;
|
guint chroma_type, va_chroma_format, i;
|
||||||
const VAImageFormat *va_format;
|
const VAImageFormat *va_format;
|
||||||
VASurfaceAttrib attribs[3], *attrib;
|
VASurfaceAttrib attribs[3], *attrib;
|
||||||
VASurfaceAttribExternalBuffers extbuf;
|
VASurfaceAttribExternalBuffers extbuf = { 0, };
|
||||||
gboolean extbuf_needed = FALSE;
|
gboolean extbuf_needed = FALSE;
|
||||||
|
|
||||||
va_format = gst_vaapi_video_format_to_va_format (format);
|
va_format = gst_vaapi_video_format_to_va_format (format);
|
||||||
|
@ -155,7 +155,6 @@ gst_vaapi_surface_init_full (GstVaapiSurface * surface,
|
||||||
if (!va_chroma_format)
|
if (!va_chroma_format)
|
||||||
goto error_unsupported_format;
|
goto error_unsupported_format;
|
||||||
|
|
||||||
memset (&extbuf, 0, sizeof (extbuf));
|
|
||||||
extbuf.pixel_format = va_format->fourcc;
|
extbuf.pixel_format = va_format->fourcc;
|
||||||
extbuf.width = GST_VIDEO_INFO_WIDTH (vip);
|
extbuf.width = GST_VIDEO_INFO_WIDTH (vip);
|
||||||
extbuf.height = GST_VIDEO_INFO_HEIGHT (vip);
|
extbuf.height = GST_VIDEO_INFO_HEIGHT (vip);
|
||||||
|
@ -232,7 +231,7 @@ gst_vaapi_surface_init_from_buffer_proxy (GstVaapiSurface * surface,
|
||||||
guint chroma_type, va_chroma_format;
|
guint chroma_type, va_chroma_format;
|
||||||
const VAImageFormat *va_format;
|
const VAImageFormat *va_format;
|
||||||
VASurfaceAttrib attribs[2], *attrib;
|
VASurfaceAttrib attribs[2], *attrib;
|
||||||
VASurfaceAttribExternalBuffers extbuf;
|
VASurfaceAttribExternalBuffers extbuf = { 0, };
|
||||||
unsigned long extbuf_handle;
|
unsigned long extbuf_handle;
|
||||||
guint i, width, height;
|
guint i, width, height;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue