Revision b9553cf4 libavformat/avio.c

View differences:

libavformat/avio.c
287 287

  
288 288
int ffurl_read(URLContext *h, unsigned char *buf, int size)
289 289
{
290
    if (h->flags & AVIO_FLAG_WRITE)
290
    if (!(h->flags & AVIO_FLAG_READ))
291 291
        return AVERROR(EIO);
292 292
    return retry_transfer_wrapper(h, buf, size, 1, h->prot->url_read);
293 293
}
294 294

  
295 295
int ffurl_read_complete(URLContext *h, unsigned char *buf, int size)
296 296
{
297
    if (h->flags & AVIO_FLAG_WRITE)
297
    if (!(h->flags & AVIO_FLAG_READ))
298 298
        return AVERROR(EIO);
299 299
    return retry_transfer_wrapper(h, buf, size, size, h->prot->url_read);
300 300
}

Also available in: Unified diff