[MPlayer-dev-eng] [PATCH] remove default.sub fallback

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Apr 18 21:28:44 CEST 2006


Hi,
On Tue, Apr 18, 2006 at 02:42:08PM +0200, Diego Biurrun wrote:
> On Tue, Apr 18, 2006 at 02:11:52PM +0200, Diego Biurrun wrote:
> > As discussed on -cvslog..  Here is a patch, have I overlooked something?
> > 
> > --- mencoder.c	30 Mar 2006 23:44:35 -0000	1.348
> > +++ mencoder.c	18 Apr 2006 12:10:59 -0000
> > @@ -657,7 +657,7 @@
> >        tmp = sub_filenames((psub ? psub : ""), filename);
> >        free(psub);
> >      }
> > -    subdata=sub_read_file(tmp ? tmp[0] : "default.sub", sh_video->fps);
> > +    subdata=sub_read_file(tmp ? tmp[0] : tmp, sh_video->fps);
> 
> tmp is initialized to NULL above, but it's probably better to make this
> explicit and change the line to 
> 
>   +    subdata=sub_read_file(tmp ? tmp[0] : NULL, sh_video->fps);

IMHO move the
if (filename) up so it is if (sub_auto && filename), then tmp will
always be != NULL and you can just use tmp[0].
Btw. is there any reason that only the first subtitle is loaded?

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list