michael <subversion at mplayerhq.hu> writes:
Author: michael Date: Sat Jun 7 11:12:42 2008 New Revision: 13685
Log: Presets support. How per codec defaults and ranges will be supported is still being discussed.
Modified: trunk/ffmpeg.c
Modified: trunk/ffmpeg.c ============================================================================== --- trunk/ffmpeg.c (original) +++ trunk/ffmpeg.c Sat Jun 7 11:12:42 2008 @@ -3636,6 +3636,41 @@ static int opt_bsf(const char *opt, cons return 0; }
+static int opt_preset(const char *opt, const char *arg) +{ + FILE *f; + char tmp[100], tmp2[100]; + char *home= getenv("HOME"); + + snprintf(tmp, sizeof(tmp), "%s/.ffmpeg/%s.ffpreset", home, arg);
Guess what happens if HOME isn't set. Also, 100 might be a little short for a full pathname. I've used systems where my home dir path was over 30 characters, and I can easily imagine longer ones. -- M?ns Rullg?rd mans at mansr.com