From 756f2a4576f7e5fe134c311ba9d095d61cb9dd12 Mon Sep 17 00:00:00 2001 From: Jeffy Chen <jeffy.chen@rock-chips.com> Date: Mon, 15 Dec 2014 10:32:22 +0800 Subject: [PATCH] rockchip: Set config_store before qbuf BUG=chrome-os-partner:33728 TEST=' build plugin lib put it under /usr/local/lib/libv4l/plugins/ update kernel to https://chromium-review.googlesource.com/#/c/232587/5 run "./video_encode_accelerator_unittest --test_stream_data=./bear_320x192_40frames.yuv:320:192:11:/tmp/out.vp8:200000" check /tmp/out.vp8 ' Change-Id: I5343e6832d8b96bc773cfe74475c98a4dc993cfa Reviewed-on: https://chromium-review.googlesource.com/235602 Reviewed-by: Pawel Osciak <posciak@chromium.org> Commit-Queue: Jeffy Chen <jeffy.chen@rock-chips.com> Tested-by: Jeffy Chen <jeffy.chen@rock-chips.com> --- libv4l-rockchip/libv4l-encplugin-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libv4l-rockchip/libv4l-encplugin-rockchip.c b/libv4l-rockchip/libv4l-encplugin-rockchip.c index edb6526..e9d2bb1 100644 --- a/libv4l-rockchip/libv4l-encplugin-rockchip.c +++ b/libv4l-rockchip/libv4l-encplugin-rockchip.c @@ -341,6 +341,8 @@ static int ioctl_qbuf_locked(struct encoder_context *ctx, int fd, if (ret) return ret; + /* TODO: change this to config_store after the header is updated. */ + buffer->reserved2 = buffer->index + 1; ret = SYS_IOCTL(fd, VIDIOC_QBUF, buffer); if (ret == 0) ctx->can_qbuf = false; -- GitLab