From 26536a0d8b760c220e32ce5c9683260b9e66c33b Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 27 Apr 2018 21:15:22 +0200 Subject: [PATCH] context: Add warning about index mismatch when allocating source buffers Signed-off-by: Paul Kocialkowski --- src/context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/context.c b/src/context.c index aa91de3..d7be981 100644 --- a/src/context.c +++ b/src/context.c @@ -108,6 +108,9 @@ VAStatus SunxiCedrusCreateContext(VADriverContextP context, goto error; } + if (surface_object->destination_index != i) + sunxi_cedrus_log("Mismatch between source index %d and destination index %d for surface %d\n", i, surface_object->destination_index, surfaces_ids[i]); + rc = v4l2_request_buffer(driver_data->video_fd, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, i, &length, &offset); if (rc < 0) { status = VA_STATUS_ERROR_ALLOCATION_FAILED;