diff options
Diffstat (limited to 'media/tools/media_bench')
-rw-r--r-- | media/tools/media_bench/media_bench.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc index 5e1b844..57217dc 100644 --- a/media/tools/media_bench/media_bench.cc +++ b/media/tools/media_bench/media_bench.cc @@ -212,9 +212,19 @@ int main(int argc, const char** argv) { av_register_all(); av_register_protocol(&kFFmpegFileProtocol); AVFormatContext* format_context = NULL; - if (av_open_input_file(&format_context, in_path.c_str(), NULL, 0, NULL) < 0) { - std::cerr << "Error: Could not open input for " - << in_path << std::endl; + int result = av_open_input_file(&format_context, in_path.c_str(), + NULL, 0, NULL); + if (result < 0) { + switch (result) { + case AVERROR_NOFMT: + std::cerr << "Error: File format not supported " + << in_path << std::endl; + break; + default: + std::cerr << "Error: Could not open input for " + << in_path << std::endl; + break; + } return 1; } |