mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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
This commit is contained in:
parent
e31248dc28
commit
bb8894aaf9
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue