Uvc_capture_aml freeze camera after sometime

hi,
I noticed that the SDK demo camera freezes after sometime. I use C920 Logitech camera and another microsoft camera and both suffer from this (they use UVC with mjpeg compression). I tried to debug so I downloaded this awesome github project from one of the khadas team https://github.com/numbqq/uvc_capture_aml and let it stream for some time but it freezes too. I noticed that the amlv4l_dequeuebuf always return -11 when camera freezes in do {…} while (isize < header_length) loop.

should we re-initialize the camera every time that happen?
please advise as I am newbie in this field

regards

I have a fix on my side already, I will test tonight, if it works well I will upload the code tomorrow. :wink:

1 Like

Man, I was struggling for like 4 days, I can’t wait :star_struck:

Thanks

I have updated the code, please check again.

2 Likes

wow, thank you. it looks great. I have left it for like 4hours and it is working fine.

1 Like