aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-04-20 18:13:54 +0200
committerNicolas George <nicolas.george@normalesup.org>2011-04-20 18:13:54 +0200
commitb9553cf4b80d79c280ae7c989593ce1daac4cafa (patch)
tree7e62e559614b2f955e01faa23f5cdfea4f7c27e0 /libavformat/avio.c
parent89451dd6e4da40ed73b8bbee2d48d8d8be1d5b0c (diff)
downloadffmpeg-b9553cf4b80d79c280ae7c989593ce1daac4cafa.tar.gz
avio: fix AVIO_FLAG_READ/WRITE test in ffurl_*.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 0a09cf1c44..936a3d979c 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -287,14 +287,14 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
int ffurl_read(URLContext *h, unsigned char *buf, int size)
{
- if (h->flags & AVIO_FLAG_WRITE)
+ if (!(h->flags & AVIO_FLAG_READ))
return AVERROR(EIO);
return retry_transfer_wrapper(h, buf, size, 1, h->prot->url_read);
}
int ffurl_read_complete(URLContext *h, unsigned char *buf, int size)
{
- if (h->flags & AVIO_FLAG_WRITE)
+ if (!(h->flags & AVIO_FLAG_READ))
return AVERROR(EIO);
return retry_transfer_wrapper(h, buf, size, size, h->prot->url_read);
}