Hi Wesley,

some late reply (I was off for a while), I'm trying to fix up the driver
for this particular issue.

On Mon, 2004-05-24 at 05:39, Wesley Dungan wrote:
> When I capture video using the lavrec command describe above, I never see
> the code which fixes the APP0 marker segment get executed (line 437-441 in
> lav_io.c).  From my understanding of the APP0 marker segment, its length is
> supposed to be greater than or equal to 16 bytes (>= 16), but this is not
> the case.  If you examine an AVI file captured using lavrec (DC10plus, 2.6
> kernel), then I suspect that you will see this as well.

Smaller APP0 segments are almost always read correctly, so that's not an
issue (on itself). Anyway, given the code, that should not happen. Also
see lav_query_APP_length() in lav_io.c:244 and liblavrec.c where it
calls that function.

> [some hexdumps]

I think you've got a good pointer to the bug, but you didn't actually
fetch it just yet. I suspect lavrec/lav_io.c to be OK and the driver to
be buggy. The new (0.9.x) driver has default APPn marker segments (in
zr36060.c:318), the old driver never had that. And we're indeed writing
those, and it indeed contains a space that shouldn't be there. Lavrec
still appears to set new, correct, APPn marker segments in
liblavrec.c:1321 (MJPIOC_S_PARAMS), but the driver doesn't write those
out correctly, like it doesn't remember them. I'm guessing we forgot to
add some glue code between the zr36060 and the zr36067 driver pieces,
and that is probably the actual bug here (note that in 0.7.x, those were
the same; we only separated those two in the 0.9.x driver series). I
suspect this, because there is no JPEG marker code API in videocodec.h.
This is easily added, fortunately, so it shouldn't be hard to fix this
bug correctly.

> If you have any other questions, then please let me know.  I've been very
> pleased with the mjpegtools in the past and I hope that an appropriate bug
> fix can be made (either in the 2.6 kernel module or user space code) so that
> future releases of lavrec won't suffer from this problem.

I'll write up a patch and have you and some other people test it. Should
fix the zr36050 driver as well. Interestingly, the zr36050 driver has a
appn default array with a 60-byte length marker in a 40-byte array, so
that's another bug. Review is good. ;).

Give me a few days and I'll send the patch to the list.

Ronald

-- 
Ronald S. Bultje <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to