[Bug 797222] vaapijpegdec: [regression] allocated surfaces have incorrect chroma

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Oct 8 06:26:00 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797222

--- Comment #14 from Fei <fei.w.wang at intel.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #13)
> Review of attachment 373812 [details] [review]:
> 
> ::: gst-libs/gst/vaapi/gstvaapicontext.c
> @@ +134,3 @@
>    guint i;
>  
> +  gst_vaapi_context_get_surface_formats (context);
> 
> memleak: this function returns a new reference to context->formats, but you
> are ignoring it, thus a memory leak is produced.
> 
> Please use the internal ensure_formats()
will fix this.
> 
> ::: gst-libs/gst/vaapi/gstvaapisurface.c
> @@ +323,3 @@
> + * @width: the requested surface width
> + * @height: the requested surface height
> + * @formats: the limited format list
> 
> add a new line here
will fix this.
> 
> @@ +325,3 @@
> + * @formats: the limited format list
> + * Creates a new #GstVaapiSurface with the specified chroma format and
> + * dimensions.
> 
> please explain here why this function is different from the rest.
will fix this.
> 
> @@ +337,3 @@
> +  guint i;
> +
> +  surface = gst_vaapi_object_new (gst_vaapi_surface_class (), display);
> 
> this surface is only used in gst_vaapi_surface_create(), if your code-path 
> enables ensure_format branch, another memory leak is produced.
will fix this.
> 
> ::: gst-libs/gst/vaapi/gstvaapisurface.h
> @@ +174,3 @@
>  GstVaapiSurface *
> +gst_vaapi_surface_new_from_formats (GstVaapiDisplay * display,
> +    GstVaapiChromaType chroma_type, guint width, guint height, GArray *
> formts);
> 
> I'm not very fond to add new internal API. Are we sure that we couldn't add
> this new behavior within in the functions we already have?
I didn't find any create surface api which can pass through GstVaapiContext or
GArray formats which can be used to get appropriate format that will used to
create surafce.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list