[MPlayer-dev-eng] [PATCH] ASS subtitle speedup (take 2)
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Dec 2 20:33:42 CET 2006
Hello,
Hello,
> > Should be simplified:
> > ass_image_t *img = NULL;
> > [...]
> > if (imgs) {
> > img = imgs->imgs;
> > if (!imgs->changed) // OSD has not changed
> > return;
> > if (img && imgs->changed == 1) // only positions of OSD parts have
> > changed goto skip_upload;
> > }
>
> I think it's better to check for non-zero data in VOCTRL switch and ignore
> such requests. This should not normally happen.
Probably, but one if more or less doesn't cost much.
> > Though I wonder if/how the imgs->imgs == NULL && imgs->changed == 1 case
> > should be handled (your code probably would crash?).
>
> Why should it ? imgs->imgs == NULL is nothing special, just a list of zero
> elements.
Because the original patch did
goto skip_upload;
without checking img!=NULL and the code at skip_upload did assume it to be != NULL
IIRC.
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list