From ca1abef2446efc92bfaa99f0516449531ddabf02 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Thu, 29 Aug 2019 01:17:16 +1000 Subject: [PATCH] ffmpeg: make v4l2 buffer dequeue non-blocking (zero timeout) --- ...006-avcodec-v4l2-add-timeout-when-dequeueing-buffers.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/ffmpeg/1006-avcodec-v4l2-add-timeout-when-dequeueing-buffers.patch b/package/ffmpeg/1006-avcodec-v4l2-add-timeout-when-dequeueing-buffers.patch index bd39b9587f..3be06d5586 100644 --- a/package/ffmpeg/1006-avcodec-v4l2-add-timeout-when-dequeueing-buffers.patch +++ b/package/ffmpeg/1006-avcodec-v4l2-add-timeout-when-dequeueing-buffers.patch @@ -15,7 +15,7 @@ index efcb0426e4..8f9420e28d 100644 * 2. an input buffer is ready to be dequeued */ - avbuf = v4l2_dequeue_v4l2buf(ctx, -1); -+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 50); ++ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 0); if (!avbuf) { if (ctx->done) return AVERROR_EOF; @@ -24,7 +24,7 @@ index efcb0426e4..8f9420e28d 100644 * 2. an input buffer ready to be dequeued */ - avbuf = v4l2_dequeue_v4l2buf(ctx, -1); -+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 50); ++ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 0); if (!avbuf) { if (ctx->done) return AVERROR_EOF;