diff options
author | Aman Gupta <aman@tmm1.net> | 2019-08-24 12:02:30 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2019-09-11 10:31:18 -0700 |
commit | fac834b2ae0b2802f1eca9fd804fbdf6cd34ac33 (patch) | |
tree | 4a14161ef323849fab1a6d1e6b3da3507826a9b0 /libavcodec/v4l2_context.c | |
parent | 3475758a3791dc89c6e7c406f8b032f035cd7d1e (diff) |
avcodec/v4l2_context: expose timeout for dequeue_frame
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/v4l2_context.c')
-rw-r--r-- | libavcodec/v4l2_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index 1f1b8347dc..862b382233 100644 --- a/libavcodec/v4l2_context.c +++ b/libavcodec/v4l2_context.c @@ -582,16 +582,16 @@ int ff_v4l2_context_enqueue_packet(V4L2Context* ctx, const AVPacket* pkt) return ff_v4l2_buffer_enqueue(avbuf); } -int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame) +int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* frame, int timeout) { V4L2Buffer* avbuf = NULL; /* - * blocks until: + * timeout=-1 blocks until: * 1. decoded frame available * 2. an input buffer is ready to be dequeued */ - avbuf = v4l2_dequeue_v4l2buf(ctx, -1); + avbuf = v4l2_dequeue_v4l2buf(ctx, timeout); if (!avbuf) { if (ctx->done) return AVERROR_EOF; |