From: Nicolas George Date: Wed, 9 May 2007 08:17:35 +0000 (+0000) Subject: make help message go to standard output instead of standard error X-Git-Tag: v0.5~9072 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3688f93aede7e2f37519ddbed19e4a0f57331ef5;p=platform%2Fupstream%2Flibav.git make help message go to standard output instead of standard error patch by Nicolas George \ nicolas george normalesup org / Originally committed as revision 8947 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/ffmpeg.c b/ffmpeg.c index 105e113..c596c00 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -3718,8 +3718,18 @@ static void show_license(void) exit(1); } +/** + * Trivial log callback. + * Only suitable for show_help and similar since it lacks prefix handling. + */ +static void log_callback_help(void* ptr, int level, const char* fmt, va_list vl) +{ + vfprintf(stdout, fmt, vl); +} + static void show_help(void) { + av_log_set_callback(log_callback_help); show_banner(); printf("usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...\n" "Hyper fast Audio and Video encoder\n");