[FFmpeg-devel] [PATCH] cmdutils: make show_usage() use av_log()
Michael Niedermayer
michaelni at gmx.at
Fri Jan 6 19:46:34 CET 2012
On Fri, Jan 06, 2012 at 07:13:48PM +0100, Stefano Sabatini wrote:
> Avoid printing on stdout when show_usage is used in an error message.
> ---
> avconv.c | 6 +++---
> ffmpeg.c | 6 +++---
> ffplay.c | 6 +++---
> ffprobe.c | 6 +++---
> 4 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/avconv.c b/avconv.c
> index e02139d..92a5257 100644
> --- a/avconv.c
> +++ b/avconv.c
> @@ -4187,9 +4187,9 @@ static int opt_audio_qscale(OptionsContext *o, const char *opt, const char *arg)
>
> static void show_usage(void)
> {
> - printf("Hyper fast Audio and Video encoder\n");
> - printf("usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name);
> - printf("\n");
> + av_log(NULL, AV_LOG_INFO, "Hyper fast Audio and Video encoder\n");
> + av_log(NULL, AV_LOG_INFO, "usage: %s [options] [[infile options] -i infile]... {[outfile options] outfile}...\n", program_name);
> + av_log(NULL, AV_LOG_INFO, printf("\n");
i dont think that compiles
rest LGTM
[..]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120106/61e0d9c3/attachment.asc>
More information about the ffmpeg-devel
mailing list