[FFmpeg-cvslog] r20346 - trunk/libavformat/img2.c
benoit
subversion
Thu Oct 22 18:27:01 CEST 2009
Author: benoit
Date: Thu Oct 22 18:27:01 2009
New Revision: 20346
Log:
Fixes detection and error reporting of non-existing files in img2.c.
Patch by Samuli Valo: name surname picturall com
Modified:
trunk/libavformat/img2.c
Modified: trunk/libavformat/img2.c
==============================================================================
--- trunk/libavformat/img2.c Thu Oct 22 17:57:04 2009 (r20345)
+++ trunk/libavformat/img2.c Thu Oct 22 18:27:01 2009 (r20346)
@@ -128,7 +128,9 @@ static int find_image_range(int *pfirst_
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(AVFormatConte
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;
More information about the ffmpeg-cvslog
mailing list