mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
ffmpeg: reduce v4l2 buffer dequeue timeout
This commit is contained in:
parent
223f55aa98
commit
bbbc89cca9
@ -15,7 +15,7 @@ index efcb0426e4..8f9420e28d 100644
|
|||||||
* 2. an input buffer is ready to be dequeued
|
* 2. an input buffer is ready to be dequeued
|
||||||
*/
|
*/
|
||||||
- avbuf = v4l2_dequeue_v4l2buf(ctx, -1);
|
- avbuf = v4l2_dequeue_v4l2buf(ctx, -1);
|
||||||
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 200);
|
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 50);
|
||||||
if (!avbuf) {
|
if (!avbuf) {
|
||||||
if (ctx->done)
|
if (ctx->done)
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
@ -24,7 +24,7 @@ index efcb0426e4..8f9420e28d 100644
|
|||||||
* 2. an input buffer ready to be dequeued
|
* 2. an input buffer ready to be dequeued
|
||||||
*/
|
*/
|
||||||
- avbuf = v4l2_dequeue_v4l2buf(ctx, -1);
|
- avbuf = v4l2_dequeue_v4l2buf(ctx, -1);
|
||||||
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 200);
|
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 50);
|
||||||
if (!avbuf) {
|
if (!avbuf) {
|
||||||
if (ctx->done)
|
if (ctx->done)
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user