summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-04-15 16:42:09 +0200
committerAnton Khirnov <anton@khirnov.net>2011-04-19 19:47:58 +0200
commit59d96941f0285a501989d5f2c9b69be0a1393ed5 (patch)
tree8a8df3842d20ac6543309dc4063376bf50580944 /libavformat/img2.c
parent490a022d86ef1c506a79744c5a95368af356fc69 (diff)
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
Make AVIO_FLAG_ access constants work as flags, and in particular fix the behavior of functions (such as avio_check()) which expect them to be flags rather than modes. This breaks API.
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 2b5d63b0bd..84d841f0ed 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -278,7 +278,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_RDONLY) < 0) {
+ if (avio_open(&f[i], filename, AVIO_FLAG_READ) < 0) {
if(i==1)
break;
av_log(s1, AV_LOG_ERROR, "Could not open file : %s\n",filename);
@@ -362,7 +362,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EIO);
}
for(i=0; i<3; i++){
- if (avio_open(&pb[i], filename, AVIO_WRONLY) < 0) {
+ if (avio_open(&pb[i], filename, AVIO_FLAG_WRITE) < 0) {
av_log(s, AV_LOG_ERROR, "Could not open file : %s\n",filename);
return AVERROR(EIO);
}