[MPlayer-dev-eng] [PATCH] Subtitles directories

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Nov 22 21:28:19 CET 2010


On Mon, Nov 22, 2010 at 09:10:40PM +0100, Clément Bœsch wrote:
> On Mon, Nov 22, 2010 at 12:05:08AM +0100, Reimar Döffinger wrote:
> > On Sun, Nov 21, 2010 at 11:12:32PM +0100, Clément Bœsch wrote:
> > > > > @@ -2012,8 +2013,7 @@ char** sub_filenames(const char* path, char *fname)
> > > > >  		    }
> > > > >  		    if (!prio) {
> > > > >  			// doesn't contain the movie name
> > > > > -			// don't try in the mplayer subtitle directory
> > > > > -			if ((j == 0) && (sub_match_fuzziness >= 2)) {
> > > > > +			if (sub_match_fuzziness >= 2) {
> > > > 
> > > > Huh? Where did handling of this end up? Loading any subtitle file anywhere in the
> > > > path doesn't sound to me like it would ever be desireable.
> > > > 
> > > 
> > > I added a limit_fuzziness flag to keep ignoring sub_fuzziness=2 on
> > > ~/.mplayer/sub directory. subdirs patch updates a little the documentation
> > > about this point too.
> > 
> > Sure it doesn't make more sense to only apply it to the movie
> > directory and nothing else at all?
> > Doesn't make sense to have a path where there's only the subtitle(s)
> > for one single movie - and in all other cases it will end up
> > with wrong subtitles.
> > 
> 
> After the first patch, it will still be the same: only two directories are
> tracked: ~/.mplayer/sub and the movie one.
> 
> About the fuzziness behaviour with the subdirs patch, I think it should
> also honor the value of 2 since subdirs patch is mainly for relative
> paths.

Ok, your examples convinced me. Well, at least enough that I think either is ok.
Of course it would be possible to make it depend on relative vs. absolute
path, but let's forget about that for now.

> > And actually, -sub did disable auto-loading before.
> 
> Huh? I don't think so; the old code do that:
> 
>   if (sub_name) {
>      ...
>   }
> 
>   if (sub_auto) {
>      ...
>   }
> 
> And I kept this.

You obviously missed the else.
Oh, what a mess. The else is only there in mencoder...


More information about the MPlayer-dev-eng mailing list