From 1802120705fec611153201a8086cd23614823953 Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sun, 27 Oct 2019 20:15:50 +0100 Subject: [PATCH] for #27: get buffer asynchronously --- src/v4l2grab_h264.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/v4l2grab_h264.cpp b/src/v4l2grab_h264.cpp index 4f69107..bac8f66 100644 --- a/src/v4l2grab_h264.cpp +++ b/src/v4l2grab_h264.cpp @@ -155,7 +155,7 @@ int main(int argc, char **argv) while (!stop) { - OMX_BUFFERHEADERTYPE *buf = ilclient_get_input_buffer(video_encode, 200, 1); + OMX_BUFFERHEADERTYPE *buf = ilclient_get_input_buffer(video_encode, 200, 0); if (buf != NULL) { /* fill it */ @@ -168,7 +168,7 @@ int main(int argc, char **argv) } } - OMX_BUFFERHEADERTYPE *out = ilclient_get_output_buffer(video_encode, 201, 1); + OMX_BUFFERHEADERTYPE *out = ilclient_get_output_buffer(video_encode, 201, 0); if (out != NULL) { if (out->nFilledLen > 0) @@ -191,8 +191,6 @@ int main(int argc, char **argv) { LOG(WARN) << "Error filling buffer:" << r ; } - } else { - LOG(WARN) << "Error filling buffer is null" ; } }