Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index b6082c68f8..11ebf12d43 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -143,11 +143,11 @@ 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;
- if (avio_check(buf, AVIO_FLAG_READ) > 0)
+ if(url_exist(buf))
return 0;
return -1;
}
- if (avio_check(buf, AVIO_FLAG_READ) > 0)
+ if (url_exist(buf))
break;
}
if (first_index == 5)
@@ -165,7 +165,7 @@ static int find_image_range(int *pfirst_index, int *plast_index,
if (av_get_frame_filename(buf, sizeof(buf), path,
last_index + range1) < 0)
goto fail;
- if (avio_check(buf, AVIO_FLAG_READ) <= 0)
+ if (!url_exist(buf))
break;
range = range1;
/* just in case... */
@@ -314,7 +314,7 @@ static int read_packet(AVFormatContext *s1, AVPacket *pkt)
s->path, s->img_number)<0 && s->img_number > 1)
return AVERROR(EIO);
for(i=0; i<3; i++){
- if (avio_open(&f[i], filename, AVIO_FLAG_READ) < 0) {
+ if (avio_open(&f[i], filename, AVIO_RDONLY) < 0) {
if(i==1)
break;
av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n",filename);
@@ -401,7 +401,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EINVAL);
}
for(i=0; i<3; i++){
- if (avio_open(&pb[i], filename, AVIO_FLAG_WRITE) < 0) {
+ if (avio_open(&pb[i], filename, AVIO_WRONLY) < 0) {
av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename);
return AVERROR(EIO);
}