mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
Use url_fopen error code when opening input file
handle the AVERROR_NOENT error case in print_error Originally committed as revision 8977 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
35e7f087ba
commit
0ba0c8debb
@ -138,6 +138,9 @@ void print_error(const char *filename, int err)
|
|||||||
case AVERROR_NOMEM:
|
case AVERROR_NOMEM:
|
||||||
fprintf(stderr, "%s: memory allocation error occured\n", filename);
|
fprintf(stderr, "%s: memory allocation error occured\n", filename);
|
||||||
break;
|
break;
|
||||||
|
case AVERROR_NOENT:
|
||||||
|
fprintf(stderr, "%s: no such file or directory\n", filename);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s: Error while opening file\n", filename);
|
fprintf(stderr, "%s: Error while opening file\n", filename);
|
||||||
break;
|
break;
|
||||||
|
@ -417,8 +417,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
|
|||||||
|
|
||||||
if (!fmt || must_open_file) {
|
if (!fmt || must_open_file) {
|
||||||
/* if no file needed do not try to open one */
|
/* if no file needed do not try to open one */
|
||||||
if (url_fopen(pb, filename, URL_RDONLY) < 0) {
|
if ((err=url_fopen(pb, filename, URL_RDONLY)) < 0) {
|
||||||
err = AVERROR_IO;
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
file_opened = 1;
|
file_opened = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user