ENOMEM indicates an allocation failure, and there are no allocations
happening here. The buffers are pre-allocated and there are simply
none available at this time.
Signed-off-by: Aman Gupta <aman@tmm1.net>
avbuf = v4l2_getfree_v4l2buf(ctx);
if (!avbuf)
avbuf = v4l2_getfree_v4l2buf(ctx);
if (!avbuf)
- return AVERROR(ENOMEM);
+ return AVERROR(EAGAIN);
ret = ff_v4l2_buffer_avpkt_to_buf(pkt, avbuf);
if (ret)
ret = ff_v4l2_buffer_avpkt_to_buf(pkt, avbuf);
if (ret)
ret = ff_v4l2_context_enqueue_packet(output, &avpkt);
if (ret < 0) {
ret = ff_v4l2_context_enqueue_packet(output, &avpkt);
if (ret < 0) {
- if (ret != AVERROR(ENOMEM))
+ if (ret != AVERROR(EAGAIN))
return ret;
/* no input buffers available, continue dequeing */
}
return ret;
/* no input buffers available, continue dequeing */
}