mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avio: fix AVIO_FLAG_READ/WRITE test in ffurl_*.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
This commit is contained in:
parent
89451dd6e4
commit
b9553cf4b8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user