aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorRobert Swain <robert.swain@gmail.com>2009-01-25 23:10:56 +0000
committerRobert Swain <robert.swain@gmail.com>2009-01-25 23:10:56 +0000
commit177716826910657b4602e1ff5a738b3ce2000eb7 (patch)
treeb1df7a9936246707a63f148fe9653231d74c6c92 /ffmpeg.c
parent1e60e933556a335dda598caed673e29480492d30 (diff)
downloadffmpeg-177716826910657b4602e1ff5a738b3ce2000eb7.tar.gz
Make opt_preset() use FFMPEG_DATADIR from config.h rather than /usr and
/usr/local Originally committed as revision 16795 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 03f9109cd7..42ac417ac8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3700,19 +3700,18 @@ static int opt_preset(const char *opt, const char *arg)
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");
}
}