From cfd3d725a10f84b9d477732e04924b64f8d39dbb Mon Sep 17 00:00:00 2001 From: Mateusz Krawczuk Date: Wed, 8 Jul 2015 14:10:52 +0200 Subject: v4l2-mfc-example: Don`t dequeue first frame HACK: Fixing h264 on exynos5 Signed-off-by: Mateusz Krawczuk --- v4l2-mfc-example/main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/v4l2-mfc-example/main.c b/v4l2-mfc-example/main.c index a27aa16..5360204 100644 --- a/v4l2-mfc-example/main.c +++ b/v4l2-mfc-example/main.c @@ -107,6 +107,7 @@ int dequeue_output(struct instance *i, int *n) struct v4l2_plane planes[MFC_OUT_PLANES]; memzero(qbuf); + memzero(planes[0]); qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; qbuf.memory = V4L2_MEMORY_MMAP; qbuf.m.planes = planes; @@ -154,6 +155,7 @@ void *parser_thread_func(void *args) int ret; int used, fs, n; + i->mfc.out_buf_flag[0] = 1; while (!i->error && !i->finish && !i->parser.finished) { n = 0; while (n < i->mfc.out_buf_cnt && i->mfc.out_buf_flag[n]) @@ -588,11 +590,6 @@ int main(int argc, char **argv) return 1; } - if (dequeue_output(&inst, &n)) { - cleanup(&inst); - return 1; - } - if (inst.fimc.enabled && fimc_setup_output_from_mfc(&inst)) { cleanup(&inst); return 1; @@ -615,7 +612,6 @@ int main(int argc, char **argv) * is queued before switching streaming on then we need to add the * following code. Otherwise it could be ommited and it all would be * handled by the mfc_thread.*/ - for (n = 0 ; n < inst.mfc.cap_buf_cnt; n++) { if (mfc_dec_queue_buf_cap(&inst, n)) { -- cgit v1.2.3