red-flash fix

Forum for questions and support relating to the 1.25.x releases only.
Locked
dvitali
Posts: 1
Joined: Thu Dec 13, 2012 5:45 pm

red-flash fix

Post by dvitali »

This is a retry to post since yesterday system said spam-remove url's for new user???!!!

This time I'll just say what I did to fix the red flash on jpeg Live video through remote-camera-http module. The source code 1.25.3 dated 7/12 was modified in my testing. Looks like a bug in the removal of 0xa 0xd caused an indexing error causing Jpeg error Two SOI's, the try fix error by filling with red.
Normally with no error the ff-d9 ending char were not at the end of buffer--content-length but offset -2 with an random hex at the end i. e. buffer{content_length-2]=0xff buffer[content_length-1]=0xd9 buffer_content_length]=0x??.
The while loop which takes out the 0xa and 0xd \n \r redid the content_length and end_prt to end at 0xd9. which caused the problem. So I removed content_length-- and end_prt--. and user *end_ptr = '\0'; to null it out preserving content_length and end_ptr as normal above.. Might want to check your indexes on buffer /memory read write loops being off by one. This also fixes false motion detect when the red flash happens.
Nice software, not used to c++ since I'm a old in-line basic programmer from way back.
Just checked the Zoneminder after being on overnight, worked great, no red flashed or false motion triggers.
Hope this helps you on the next update or unsolved problem reports.
Dennis A. Vitali
Locked