[MPlayer-dev-eng] [patch] improved searching for subtitles

D Richard Felker III dalias at aerifal.cx
Mon Feb 3 10:47:08 CET 2003


On Mon, Feb 03, 2003 at 10:37:11AM +0100, Arpi wrote:
> Hi,
> 
> > this patch replaces subreader.c:sub_filename with another version, which 
> > reads the movie and subtitle directories via opendir & readdir instead 
> > of blindly trying to open various files. The filenames are trimmed so 
> > it's capable of finding filenames which differ in character case or 
> > whitespace characters. It also adds a -subid option which specifies the 
> > string required after the movie name (eg. like Face.Off_CZ.srt) to 
> > prefer a specific subtitle language by default.
> > 
> > Is it post-0.90 or ok to commit now?
> 
> I vote for post-0.90 because
> - patch is long, replaces tested working code with new longer untested one
> - it's a new feature not a trivial/critical bugfix
> - it adds new option, which should be documented, translated etc
> - i don't think this feature is useful at all.

IMO this patch is dumb. Consider the case where you have a directory
with hundreds or thousands of files in it on slow media. Reading
through the whole thing to find a matching filename could be a major
pain. A much nicer fix would be to rename the subtitle files not to
have extra junk in their names.

Rich



More information about the MPlayer-dev-eng mailing list