[FFmpeg-cvslog] r16795 - trunk/ffmpeg.c
Stefano Sabatini
stefano.sabatini-lala
Mon Jan 26 09:17:33 CET 2009
On date Monday 2009-01-26 00:10:56 +0100, superdump wrote:
> Author: superdump
> Date: Mon Jan 26 00:10:56 2009
> New Revision: 16795
>
> Log:
> Make opt_preset() use FFMPEG_DATADIR from config.h rather than /usr and
> /usr/local
>
> Modified:
> trunk/ffmpeg.c
>
> Modified: trunk/ffmpeg.c
> ==============================================================================
> --- trunk/ffmpeg.c Sun Jan 25 23:59:05 2009 (r16794)
> +++ trunk/ffmpeg.c Mon Jan 26 00:10:56 2009 (r16795)
> @@ -3700,19 +3700,18 @@ static int opt_preset(const char *opt, c
> FILE *f=NULL;
> char filename[1000], tmp[1000], tmp2[1000], line[1000];
> int i;
> - const char *base[3]= { getenv("HOME"),
> - "/usr/local/share",
> - "/usr/share",
> + const char *base[2]= { getenv("HOME"),
> + FFMPEG_DATADIR,
> };
>
> - for(i=!base[0]; i<3 && !f; i++){
> - snprintf(filename, sizeof(filename), "%s/%sffmpeg/%s.ffpreset", base[i], i ? "" : ".", arg);
> + for(i=!base[0]; i<2 && !f; i++){
> + snprintf(filename, sizeof(filename), "%s%s/%s.ffpreset", base[i], i ? "" : "/.ffmpeg", arg);
> f= fopen(filename, "r");
> if(!f){
> char *codec_name= *opt == 'v' ? video_codec_name :
> *opt == 'a' ? audio_codec_name :
> subtitle_codec_name;
> - snprintf(filename, sizeof(filename), "%s/%sffmpeg/%s-%s.ffpreset", base[i], i ? "" : ".", codec_name, arg);
> + snprintf(filename, sizeof(filename), "%s%s/%s-%s.ffpreset", base[i], i ? "" : "/.ffmpeg", codec_name, arg);
> f= fopen(filename, "r");
> }
> }
We need to update documentation as well.
Regards.
More information about the ffmpeg-cvslog
mailing list