[FFmpeg-cvslog] r20435 - trunk/ffmpeg.c

ramiro subversion
Tue Nov 3 00:41:54 CET 2009


Author: ramiro
Date: Tue Nov  3 00:41:54 2009
New Revision: 20435

Log:
Add -fpre option to take a preset file as parameter. The -[avs]pre options no
longer accept filenames, and -fpre should be used instead.

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Mon Nov  2 21:23:47 2009	(r20434)
+++ trunk/ffmpeg.c	Tue Nov  3 00:41:54 2009	(r20435)
@@ -3775,6 +3775,7 @@ static int opt_preset(const char *opt, c
                            FFMPEG_DATADIR,
                          };
 
+    if (*opt != 'f') {
     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");
@@ -3786,8 +3787,7 @@ static int opt_preset(const char *opt, c
             f= fopen(filename, "r");
         }
     }
-    if(!f && ((arg[0]=='.' && arg[1]=='/') || arg[0]=='/' ||
-              is_dos_path(arg))){
+    } else {
         av_strlcpy(filename, arg, sizeof(filename));
         f= fopen(filename, "r");
     }
@@ -3945,6 +3945,7 @@ static const OptionDef options[] = {
     { "apre", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_preset}, "set the audio options to the indicated preset", "preset" },
     { "vpre", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_preset}, "set the video options to the indicated preset", "preset" },
     { "spre", OPT_FUNC2 | HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_preset}, "set the subtitle options to the indicated preset", "preset" },
+    { "fpre", OPT_FUNC2 | HAS_ARG | OPT_EXPERT, {(void*)opt_preset}, "set options to the indicated preset file", "filename" },
 
     { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
     { NULL, },



More information about the ffmpeg-cvslog mailing list