diff options
author | Samuli Valo <samuli.valo@picturall.com> | 2009-10-22 16:27:01 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2009-10-22 16:27:01 +0000 |
commit | c671ac40f5d8562b7dc5ec80d6d17520fe80b84d (patch) | |
tree | 3c1bef81dc1460ed762092df73265a56abf16fe9 /libavformat/img2.c | |
parent | bb7d0e87aedef2f66ab40324cd31cb5db5f568c8 (diff) | |
download | ffmpeg-c671ac40f5d8562b7dc5ec80d6d17520fe80b84d.tar.gz |
Fixes detection and error reporting of non-existing files in img2.c.
Patch by Samuli Valo: name surname picturall com
Originally committed as revision 20346 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r-- | libavformat/img2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index a90381dc4b..b5a91cd73b 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -128,7 +128,9 @@ static int find_image_range(int *pfirst_index, int *plast_index, if (av_get_frame_filename(buf, sizeof(buf), path, first_index) < 0){ *pfirst_index = *plast_index = 1; - return 0; + if(url_exist(buf)) + return 0; + return -1; } if (url_exist(buf)) break; @@ -221,7 +223,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) if (!s->is_pipe) { if (find_image_range(&first_index, &last_index, s->path) < 0) - return AVERROR(EIO); + return AVERROR(ENOENT); s->img_first = first_index; s->img_last = last_index; s->img_number = first_index; |