mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 21:56:31 +00:00
Merge pull request #2079 from jasaw/xu4-hw-h264
ffmpeg: make v4l2 buffer dequeue non-blocking (zero timeout)
This commit is contained in:
commit
83cd5fdb22
@ -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 : 50);
|
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 0);
|
||||||
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 : 50);
|
+ avbuf = v4l2_dequeue_v4l2buf(ctx, ctx_to_m2mctx(ctx)->draining ? -1 : 0);
|
||||||
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