# HG changeset patch # User benoit # Date 1256228821 0 # Node ID feffcbc8990403bf90fe514b9dc7edb78704b895 # Parent 3616c1434288c49ff5bf02a6055671923b3aec36 Fixes detection and error reporting of non-existing files in img2.c. Patch by Samuli Valo: name surname picturall com diff -r 3616c1434288 -r feffcbc89904 img2.c --- a/img2.c Wed Oct 21 01:25:39 2009 +0000 +++ b/img2.c Thu Oct 22 16:27:01 2009 +0000 @@ -128,7 +128,9 @@ 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 @@ 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;