removes ffmpeg's the v4l2 buffer dequeue timeout patch

This commit is contained in:
popoviciri 2019-09-30 08:03:37 +02:00
parent fb22771b70
commit 64a6f7d53d

View File

@ -1,30 +0,0 @@
commit 05ee1b8f65e4029fcad832743701712a1a000ea3
Author: Joo Aun Saw <jasaw@dius.com.au>
Date: Mon Aug 19 15:21:30 2019 +1000
avcodec/v4l2: add timeout when dequeueing buffers
Add timeout to prevent lock up when buffer queue is empty.
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index efcb0426e4..8f9420e28d 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -580,7 +580,7 @@ int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame)
* 1. decoded frame available
* 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 : 0);
if (!avbuf) {
if (ctx->done)
return AVERROR_EOF;
@@ -600,7 +600,7 @@ int ff_v4l2_context_dequeue_packet(V4L2Context* ctx, AVPacket* pkt)
* 1. encoded packet available
* 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 : 0);
if (!avbuf) {
if (ctx->done)
return AVERROR_EOF;