Skip to content
Snippets Groups Projects
Commit bb8894aa authored by Tianhao Liu's avatar Tianhao Liu Committed by Víctor Manuel Jáquez Leal
Browse files

libs: decoder: release VA buffers after vaEndPicture

This change is due a problem decoding JPEGs with Intel's media-driver:
no image was generated.

This patch relases the VA buffers after vaEndPicture() is called,
and not before (after vaRenderPicture()).

https://bugzilla.gnome.org/show_bug.cgi?id=796505
parent e31248dc
No related branches found
No related tags found
No related merge requests found
......@@ -304,12 +304,17 @@ gst_vaapi_picture_decode (GstVaapiPicture * picture)
status = vaRenderPicture (va_display, va_context, va_buffers, 2);
if (!vaapi_check_status (status, "vaRenderPicture()"))
return FALSE;
}
status = vaEndPicture (va_display, va_context);
for (i = 0; i < picture->slices->len; i++) {
GstVaapiSlice *const slice = g_ptr_array_index (picture->slices, i);
vaapi_destroy_buffer (va_display, &slice->param_id);
vaapi_destroy_buffer (va_display, &slice->data_id);
}
status = vaEndPicture (va_display, va_context);
if (!vaapi_check_status (status, "vaEndPicture()"))
return FALSE;
return TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment