[MPlayer-dev-eng] SDL and OSD. One more time

Fredrik Kuivinen freku045 at student.liu.se
Thu Feb 21 14:14:19 CET 2002


On Wed, Feb 20, 2002 at 04:25:38PM +0100, Felix Buenemann wrote:
> On Saturday, 16. February 2002 20:38, Fredrik Kuivinen wrote:
> > Hi
> >
> > This a new "OSD above and/or below movie" patch for -vo sdl. As I mentioned
> > in a previous mail I simply don't know how to do it in a generic way with
> > the current libvo interface. Instead of throwing away my changes I have
> > updated them.
> >
> > I have modified my changes to mplayer.c without removing any functionality.
> > This patch touches a lot fewer lines than the previous one. I am surprised
> > that I didn't do it this way the first time...
> >
> > I have also fixed the bugs in my previous patch when switching between
> > fullscreen and windowed mode. There are probably a few bugs left though.
> > Feedback is very welcome.
> There are still bugs with vobsub:
> when switching from fullscreen to windowed and there is a vobsub currently 
> displayed you'll get something like that:

It's a bug in the spudec code. I have attached a patch which seems to work.

[snip]

> Secondly sometimes vobsub picture area is not fully cleared, so you get white 
> dot's where right side of vobsub was.
> 

I couldn't reproduce this. Is it with a specific vobsub and movie combination
or does it happen with one vobsub but with all movies or ... ?

/ Fredrik Kuivinen

-------------- next part --------------
Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.18
diff -u -3 -p -b -r1.18 spudec.c
--- spudec.c	15 Jan 2002 21:05:37 -0000	1.18
+++ spudec.c	21 Feb 2002 13:08:38 -0000
@@ -389,7 +389,8 @@ void spudec_draw_scaled(void *me, unsign
 		   spu->image, spu->aimage, spu->stride);
     }
     else {
-      if (!spu->scaled) {	/* Resizing is needed */
+      if (!spu->scaled ||
+          spu->orig_frame_width != dxs || spu->orig_frame_height != dys) {	/* Resizing is needed */
 	/* scaled_x = scalex * x / 0x100
 	   scaled_y = scaley * y / 0x100
 	   order of operations is important because of rounding. */


More information about the MPlayer-dev-eng mailing list