[Zbarw-devel] [zbarw:tickets] #8 zbar_video_next_image returns null while video active
status: pending --> closed
tickets:8 zbar_video_next_image returns null while video active
Created: Sun Jun 10, 2012 10:09 AM UTC by Jarek Czekalski
Last Updated: Mon Jun 11, 2012 01:18 PM UTC
zbar_video_next_image doc does not allow to return NULL under normal conditions. It should always return valid image. However under unfortunate circumstances it returns NULL breaking the processing.
The bad luck includes following: 1. fast processing 2. temporary slow-down and a new frame coming in unexpected moment
To reproduce the problem we need to: A. make frames come in slower rate (simulate fast processing) B. introduce occasional delay after WaitForSingleObject(vdo->state->captured, INFINITE); which is done outside video lock This is done by the attached patch (r393 required).
To notice the issue it's enough to run zbarcam --verbose=16. After a random (about 10) number of frames it will freeze, after reporting dshow_dq: img: 00000000.