-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
linux-v4l2: Avoid stopping capture on AVERROR(EAGAIN) #12303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good! It looks like there should be a |
78c73a6
to
e3d4925
Compare
Thank you for the suggestion! |
The commit message should be wrapped to 72 columns max. |
e3d4925
to
70ad88b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Capitalize the first word after the prefix in the commit message.
linux-v4l2: Avoid stopping capture on AVERROR(EAGAIN)
2c3e434
to
a40ad95
Compare
91b0ebd
to
2e19672
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message appears to contain the commit message of another commit. Please fix that.
be15037
to
d362dc4
Compare
v4l2-decoder: continue sending frame to codec if avcodec_receive_frame() returns AVERROR(EAGAIN)
5bc38f1
to
6903e4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
Description
When capturing video from UVC devices using H.264 at higher resolutions (e.g. 2560x1440 or higher), video capture frequently stops unexpectedly. This patch makes a minor adjustment to the decoder logic in
v4l2_decode_frame()
to continue capturing instead of stopping onAVERROR(EAGAIN)
.Motivation and Context
Currently, the
v4l2_decode_frame()
function treats all negative return values fromavcodec_receive_frame()
as fatal errors. However,AVERROR(EAGAIN)
is a common return code that simply indicates that more data is needed before a frame can be decoded. Treating this as an error causes the video capture to stop unnecessarily, especially with high-resolution formats like H.264.This change allows the decoder to continue feeding data to the codec even after receiving
AVERROR(EAGAIN)
, ensuring a more stable and continuous capture experience.How Has This Been Tested?
Types of changes
Checklist:
Checklist: