[patch] division by zero in stream/tvi_v4l2.c when norm not set
I capture from usb camera with mencoder and v4l2. There's a problem in setting a norm form v4l2 with this hardware. Then "Floating point exception is reported". Division by zero in stream/tvi_v4l2.c. The calculation performed there is only to report a warning message. I patched code just checking if the divider is zero and then omit the test. Attached diff. After applying the diff recording seems to go well. Regards Jarek
On Sat, Jan 01, 2011 at 06:04:08PM +0100, Jarek Czekalski wrote:
I capture from usb camera with mencoder and v4l2. There's a problem in setting a norm form v4l2 with this hardware. Then "Floating point exception is reported". Division by zero in stream/tvi_v4l2.c. The calculation performed there is only to report a warning message.
I patched code just checking if the divider is zero and then omit the test. Attached diff. After applying the diff recording seems to go well.
Thanks, but I changed it to use the existing getfps helper that handles this a bit better. Could you please test and report if/how it works?
Thanks for the solution, Reimar. Works fine. I goggled the subject before and I guess more people would benefit from fixing the floating point. W dniu 01/05/2011 04:11 PM, Reimar Döffinger pisze:
I capture from usb camera with mencoder and v4l2. There's a problem in setting a norm form v4l2 with this hardware. Then "Floating point exception is reported". Division by zero in stream/tvi_v4l2.c. The calculation performed there is only to report a warning message.
I patched code just checking if the divider is zero and then omit the test. Attached diff. After applying the diff recording seems to go well. Thanks, but I changed it to use the existing getfps helper that handles
On Sat, Jan 01, 2011 at 06:04:08PM +0100, Jarek Czekalski wrote: this a bit better. Could you please test and report if/how it works? _______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
On 5 jan 2011, at 18:14, Jarek Czekalski <jarekczek@poczta.onet.pl> wrote:
Thanks for the solution, Reimar. Works fine. I goggled the subject before and I guess more people would benefit from fixing the floating point.
Sure, fixing and sending a patch was a good idea, but fixing it and simplifying the code at the same time is even better, so I did that :-)
participants (2)
-
Jarek Czekalski -
Reimar Döffinger