ffmpeg_opt: Suggest to use "file:..." if a protocol was not found.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Tue, 6 Sep 2016 10:47:34 +0000 (12:47 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 7 Sep 2016 16:51:37 +0000 (18:51 +0200)
Fixes Debian bug 785690.

ffmpeg_opt.c

index 2ea09cf..0c0d3a6 100644 (file)
@@ -982,6 +982,8 @@ static int open_input_file(OptionsContext *o, const char *filename)
     err = avformat_open_input(&ic, filename, file_iformat, &o->g->format_opts);
     if (err < 0) {
         print_error(filename, err);
+        if (err == AVERROR_PROTOCOL_NOT_FOUND)
+            av_log(NULL, AV_LOG_ERROR, "Did you mean file:%s?\n", filename);
         exit_program(1);
     }
     if (scan_all_pmts_set)