Hi, I've just encountered SIGFPE playing video in Firefox using `mplayerplug-in'. I've discovered that in `libvo/vo_xv.c' in `drawosd()' function there is: vo_draw_text(image_width - image_width * vo_panscan_x / (vo_dwidth + vo_panscan_x), image_height, draw_alpha_fnc); In my case (playing in Firefox window) the variables were: vo_panscan_x = 0; vo_dwidth = 0; which caused SIGFPE, of course. There _could_ be a problem in setting those variables to zero. Anyway, I've attached patch that checks for `vo_panscan_x' being zero and avoiding divison by zero. -- V. Trebicky Index: libvo/vo_xv.c =================================================================== --- libvo/vo_xv.c (revision 23698) +++ libvo/vo_xv.c (working copy) @@ -520,8 +520,12 @@ static void draw_osd(void) { + /* avoid SIGFPE */ vo_draw_text(image_width - - image_width * vo_panscan_x / (vo_dwidth + vo_panscan_x), + (vo_panscan_x == 0) + ? 0 + : (image_width * vo_panscan_x / + (vo_dwidth + vo_panscan_x)), image_height, draw_alpha_fnc); }
Hello, On Sun, Jul 01, 2007 at 10:47:25AM +0200, Vladimír T?ebický wrote:
I've just encountered SIGFPE playing video in Firefox using `mplayerplug-in'. I've discovered that in `libvo/vo_xv.c' in `drawosd()' function there is:
vo_draw_text(image_width - image_width * vo_panscan_x / (vo_dwidth + vo_panscan_x), image_height, draw_alpha_fnc);
In my case (playing in Firefox window) the variables were:
vo_panscan_x = 0; vo_dwidth = 0;
which caused SIGFPE, of course. There _could_ be a problem in setting those variables to zero. Anyway, I've attached patch that checks for `vo_panscan_x' being zero and avoiding divison by zero.
The bug is vo_dwidth being 0, not vo_panscan_x. Also this should have been fixed in mplayerplug-in, and it is mostly a bug there for passing MPlayer a window of size 0x0. Lastly, there should be a bugzilla entry about this where I proposed a more proper fix, but never got any reply so didn't bother any further. Greetings, Reimar Doeffinger
participants (2)
-
Reimar Doeffinger -
Vladimír Třebický