[MPlayer-cvslog] CVS: main mplayer.c,1.928,1.929

Ivan Kalvachev ikalvachev at gmail.com
Sat Apr 15 13:10:31 CEST 2006


2006/4/15, Reimar Döffinger CVS <syncmail at mplayerhq.hu>:
> CVS change done by Reimar Döffinger CVS
>
> Update of /cvsroot/mplayer/main
> In directory mail:/var2/tmp/cvs-serv29156
>
> Modified Files:
>         mplayer.c
> Log Message:
> do not try to load default.sub when it doesn't exist. Fixes bug #480.
>
>
> Index: mplayer.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/mplayer.c,v
> retrieving revision 1.928
> retrieving revision 1.929
> diff -u -r1.928 -r1.929
> --- mplayer.c   14 Apr 2006 10:57:41 -0000      1.928
> +++ mplayer.c   15 Apr 2006 09:36:53 -0000      1.929
> @@ -3111,7 +3111,10 @@
>      free(tmp);
>      if (set_of_sub_size == 0)
>      {
> -        add_subtitles (mem_ptr=get_path("default.sub"), sh_video->fps, 1);
> +        struct stat st;
> +        mem_ptr = get_path("default.sub");
> +        if (stat(mem_ptr, &st) == 0)
> +            add_subtitles (mem_ptr, sh_video->fps, 0);
>      free(mem_ptr); // release the buffer created by get_path()
>      }
>    }

How about removing this default.sub relict?

It seems that it have been added back (by mistake??) by arpi at #1.437 after
the code have been previously disabled by pontscho  at commit #1.344.
The initial version goes back to 1.37 with the initial subtitle
support, where this file have been loaded if -sub option is not used.


I fail to understand how automatic loading same (default) subtitle
file for all movies could be useful... especally now when we have
automatic lookup in movie dir, in ~/.mplayer/subs/ etc...




More information about the MPlayer-cvslog mailing list