[MPlayer-dev-eng] [PATCH] Avoid SIGFPE in `libvo'

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Jul 1 11:01:49 CEST 2007


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



More information about the MPlayer-dev-eng mailing list