picture: Move calls to request reinit from EndPicture to SyncSurface
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
This commit is contained in:
@@ -240,8 +240,6 @@ VAStatus sunxi_cedrus_EndPicture(VADriverContextP ctx, VAContextID context)
|
|||||||
if(ioctl(driver_data->mem2mem_fd, VIDIOC_QBUF, &cap_buf)) {
|
if(ioctl(driver_data->mem2mem_fd, VIDIOC_QBUF, &cap_buf)) {
|
||||||
obj_surface->status = VASurfaceSkipped;
|
obj_surface->status = VASurfaceSkipped;
|
||||||
sunxi_cedrus_msg("Error when queuing output: %s\n", strerror(errno));
|
sunxi_cedrus_msg("Error when queuing output: %s\n", strerror(errno));
|
||||||
|
|
||||||
ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);
|
|
||||||
return VA_STATUS_ERROR_UNKNOWN;
|
return VA_STATUS_ERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +248,6 @@ VAStatus sunxi_cedrus_EndPicture(VADriverContextP ctx, VAContextID context)
|
|||||||
sunxi_cedrus_msg("Error when queuing input: %s\n", strerror(errno));
|
sunxi_cedrus_msg("Error when queuing input: %s\n", strerror(errno));
|
||||||
|
|
||||||
ioctl(driver_data->mem2mem_fd, VIDIOC_DQBUF, &cap_buf);
|
ioctl(driver_data->mem2mem_fd, VIDIOC_DQBUF, &cap_buf);
|
||||||
ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL);
|
|
||||||
return VA_STATUS_ERROR_UNKNOWN;
|
return VA_STATUS_ERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -191,6 +191,8 @@ VAStatus sunxi_cedrus_SyncSurface(VADriverContextP ctx,
|
|||||||
if(rc < 0)
|
if(rc < 0)
|
||||||
return VA_STATUS_ERROR_UNKNOWN;
|
return VA_STATUS_ERROR_UNKNOWN;
|
||||||
|
|
||||||
|
assert(ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL)==0);
|
||||||
|
|
||||||
memset(&(buf), 0, sizeof(buf));
|
memset(&(buf), 0, sizeof(buf));
|
||||||
buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
|
buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
|
||||||
buf.memory = V4L2_MEMORY_MMAP;
|
buf.memory = V4L2_MEMORY_MMAP;
|
||||||
@@ -217,7 +219,6 @@ VAStatus sunxi_cedrus_SyncSurface(VADriverContextP ctx,
|
|||||||
return VA_STATUS_ERROR_UNKNOWN;
|
return VA_STATUS_ERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(ioctl(request_fd, MEDIA_REQUEST_IOC_REINIT, NULL)==0);
|
|
||||||
|
|
||||||
return VA_STATUS_SUCCESS;
|
return VA_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user