Commit 5d12ec8f authored by Stefano Sabatini's avatar Stefano Sabatini

ffprobe: downgrade log level for non fatal errors in open_input_file()

Since the errors are not fatal, it is less confusing not to show them as
errors but as warnings.

Arbitrarily fixes trac ticket #2419.
parent a1fb3e51
...@@ -1936,18 +1936,18 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) ...@@ -1936,18 +1936,18 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVCodec *codec; AVCodec *codec;
if (stream->codec->codec_id == AV_CODEC_ID_PROBE) { if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
av_log(NULL, AV_LOG_ERROR, av_log(NULL, AV_LOG_WARNING,
"Failed to probe codec for input stream %d\n", "Failed to probe codec for input stream %d\n",
stream->index); stream->index);
} else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) { } else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
av_log(NULL, AV_LOG_ERROR, av_log(NULL, AV_LOG_WARNING,
"Unsupported codec with id %d for input stream %d\n", "Unsupported codec with id %d for input stream %d\n",
stream->codec->codec_id, stream->index); stream->codec->codec_id, stream->index);
} else { } else {
AVDictionary *opts = filter_codec_opts(codec_opts, stream->codec->codec_id, AVDictionary *opts = filter_codec_opts(codec_opts, stream->codec->codec_id,
fmt_ctx, stream, codec); fmt_ctx, stream, codec);
if (avcodec_open2(stream->codec, codec, &opts) < 0) { if (avcodec_open2(stream->codec, codec, &opts) < 0) {
av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n", av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
stream->index); stream->index);
} }
if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment