Commit 8af69a9e authored by benoit's avatar benoit

Use url_fopen error code when opening input file
handle the AVERROR_NOENT error case in print_error



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8977 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2584b70c
......@@ -138,6 +138,9 @@ void print_error(const char *filename, int err)
case AVERROR_NOMEM:
fprintf(stderr, "%s: memory allocation error occured\n", filename);
break;
case AVERROR_NOENT:
fprintf(stderr, "%s: no such file or directory\n", filename);
break;
default:
fprintf(stderr, "%s: Error while opening file\n", filename);
break;
......
......@@ -417,8 +417,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
if (!fmt || must_open_file) {
/* if no file needed do not try to open one */
if (url_fopen(pb, filename, URL_RDONLY) < 0) {
err = AVERROR_IO;
if ((err=url_fopen(pb, filename, URL_RDONLY)) < 0) {
goto fail;
}
file_opened = 1;
......
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