Revision 175389c8 libavformat/avio.c

View differences:

libavformat/avio.c
374 374
    return 1;
375 375
}
376 376

  
377
int avio_check(const char *url, int flags)
378
{
379
    URLContext *h;
380
    int ret = ffurl_alloc(&h, url, flags);
381
    if (ret)
382
        return ret;
383

  
384
    if (h->prot->url_check) {
385
        ret = h->prot->url_check(h, flags);
386
    } else {
387
        ret = ffurl_connect(h);
388
        if (ret >= 0)
389
            ret = flags;
390
    }
391

  
392
    ffurl_close(h);
393
    return ret;
394
}
395

  
377 396
int64_t ffurl_size(URLContext *h)
378 397
{
379 398
    int64_t pos, size;

Also available in: Unified diff