[MPlayer-dev-eng] [PATCH] ASS - detect changes to speed up -vo gl

Jindrich Makovicka makovick at gmail.com
Sun Oct 29 10:06:24 CET 2006


On Sun, 29 Oct 2006 09:42:47 +0100
Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:

> Hello,
> On Sat, Oct 28, 2006 at 08:45:47PM +0200, Jindrich Makovicka wrote:
> > +  ass_image_t *img = imgs->root;
> >    ass_image_t *i;
> >    int cnt;
> > +
> > +  if (!imgs || imgs->changed == 0)
> > +      return;
> > +
> 
> Checking for imgs == NULL after dereferencing makes no sense. Probably

Yes, I noticed this forgotten line after experiencing some more
crashes ;)

> you could simply do without the check.
> Also, I'd prefer !imgs->changed instead of imgs->changed == 0.

I used == 0 because imgs->changed is 3-state (I thought about
reusing the textures for titles that are only moving, but I don't know
the vo_gl code and opengl itself enough to actually implement it).

-- 
Jindrich Makovicka



More information about the MPlayer-dev-eng mailing list