picture: Always sync surface in EndPicture

The libVA API expects rendering to be done after calling EndPicture.
Since SyncSurface calls are generally not issued in a way compatible
with dequeuing buffers (they might be called too early or too late),
always call SyncSurface from EndPicture.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
Paul Kocialkowski
2018-04-26 09:55:20 +02:00
parent d59da24fd9
commit a412ee8b42
+5
View File
@@ -141,6 +141,7 @@ VAStatus SunxiCedrusEndPicture(VADriverContextP context,
unsigned int control_size;
unsigned int control_id;
int request_fd;
VAStatus status;
int rc;
context_object = CONTEXT(context_id);
@@ -193,6 +194,10 @@ VAStatus SunxiCedrusEndPicture(VADriverContextP context,
surface_object->slices_size = 0;
status = SunxiCedrusSyncSurface(context, context_object->render_surface_id);
if (status != VA_STATUS_SUCCESS)
return status;
context_object->render_surface_id = VA_INVALID_ID;
return VA_STATUS_SUCCESS;