Introduction
I use motion-3.2.1 (only as streaming webserver) on an old Pentium with 2 cams.
Then a second motion is running from my working desktop with 2 threads using netcam.
Sometimes at starting motion is see (not every start):
Not a JPEG file: starts with 0x33 0xeb
and motion exits
I made a patch for skipping this jpeg and reading again
up to MAX_HEADER_RETRIES (20) jpeg"s till return with error -1 in netcam_start.
now i see:
Not a JPEG file: starts with 0x33 0xeb
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x33 0xeb
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x00 0xd0
[2] netcam: jpeglib read header failed
Not a JPEG file: starts with 0x00 0xd0
[2] netcam: jpeglib read header failed
and motion is running
Description of Patch
If an error with jepg decomression occured at connecting to a mjpeg streaming webcam, this patch skips this jpeg and tries to decompress next jpeg up to MAX_HEADER_RETRIES (20).
Installation of Patch
patch <NetcamFirstHeader.diff
Change History of Patch
- motion-3.2.1-netcamfirstheader-1 , 17 Jun 2005
- Initial Release against motion-3.2.1 (with goto)
- motion-3.2.1-netcamfirstheader-2 , 23 Jun 2005
- netcam streaming connect - decompress next jpeg if current fails up to MAX_HEADER_RETRIES (20).