diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2011-12-29 12:36:33 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-01-04 01:05:51 +0100 |
commit | c972f91d5bd652dcb6f15ab603378db3b2e76e04 (patch) | |
tree | 25a14a8582e0c27b2646eae8bbd5fef8cf3e0e15 /ffprobe.c | |
parent | 6429269096902d872db977abaede1a78fa107d7f (diff) | |
download | ffmpeg-c972f91d5bd652dcb6f15ab603378db3b2e76e04.tar.gz |
ffprobe: prefer av_log to fprintf(stderr)
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1354,11 +1354,11 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) AVCodec *codec; if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) { - fprintf(stderr, "Unsupported codec with id %d for input stream %d\n", - stream->codec->codec_id, stream->index); + av_log(NULL, AV_LOG_ERROR, "Unsupported codec with id %d for input stream %d\n", + stream->codec->codec_id, stream->index); } else if (avcodec_open2(stream->codec, codec, NULL) < 0) { - fprintf(stderr, "Error while opening codec for input stream %d\n", - stream->index); + av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n", + stream->index); } } @@ -1428,7 +1428,7 @@ static int opt_format(const char *opt, const char *arg) { iformat = av_find_input_format(arg); if (!iformat) { - fprintf(stderr, "Unknown input format: %s\n", arg); + av_log(NULL, AV_LOG_ERROR, "Unknown input format: %s\n", arg); return AVERROR(EINVAL); } return 0; @@ -1437,8 +1437,8 @@ static int opt_format(const char *opt, const char *arg) static void opt_input_file(void *optctx, const char *arg) { if (input_filename) { - fprintf(stderr, "Argument '%s' provided as input filename, but '%s' was already specified.\n", - arg, input_filename); + av_log(NULL, AV_LOG_ERROR, "Argument '%s' provided as input filename, but '%s' was already specified.\n", + arg, input_filename); exit(1); } if (!strcmp(arg, "-")) @@ -1507,8 +1507,8 @@ int main(int argc, char **argv) if (!input_filename) { show_usage(); - fprintf(stderr, "You have to specify one input file.\n"); - fprintf(stderr, "Use -h to get full help or, even better, run 'man %s'.\n", program_name); + av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n"); + av_log(NULL, AV_LOG_ERROR, "Use -h to get full help or, even better, run 'man %s'.\n", program_name); exit(1); } |