Revision 22a3212e libavformat/applehttp.c

View differences:

libavformat/applehttp.c
154 154
        free_segment_list(var);
155 155
        av_free_packet(&var->pkt);
156 156
        if (var->pb)
157
            url_fclose(var->pb);
157
            avio_close(var->pb);
158 158
        if (var->ctx) {
159 159
            var->ctx->pb = NULL;
160 160
            av_close_input_file(var->ctx);
......
211 211

  
212 212
    if (!in) {
213 213
        close_in = 1;
214
        if ((ret = url_fopen(&in, url, URL_RDONLY)) < 0)
214
        if ((ret = avio_open(&in, url, URL_RDONLY)) < 0)
215 215
            return ret;
216 216
    }
217 217

  
......
284 284

  
285 285
fail:
286 286
    if (close_in)
287
        url_fclose(in);
287
        avio_close(in);
288 288
    return ret;
289 289
}
290 290

  
......
338 338
        ret = av_open_input_file(&v->ctx, v->segments[0]->url, NULL, 0, NULL);
339 339
        if (ret < 0)
340 340
            goto fail;
341
        url_fclose(v->ctx->pb);
341
        avio_close(v->ctx->pb);
342 342
        v->ctx->pb = NULL;
343 343
        v->stream_offset = stream_offset;
344 344
        /* Create new AVStreams for each stream in this variant */
......
378 378
    }
379 379
    if (c->cur_seq_no - var->start_seq_no >= var->n_segments)
380 380
        return c->finished ? AVERROR_EOF : 0;
381
    ret = url_fopen(&var->pb,
381
    ret = avio_open(&var->pb,
382 382
                    var->segments[c->cur_seq_no - var->start_seq_no]->url,
383 383
                    URL_RDONLY);
384 384
    if (ret < 0)
......
435 435
                   "Closing variant stream %d, no longer needed\n", i);
436 436
            av_free_packet(&var->pkt);
437 437
            reset_packet(&var->pkt);
438
            url_fclose(var->pb);
438
            avio_close(var->pb);
439 439
            var->pb = NULL;
440 440
            changed = 1;
441 441
        } else if (!var->pb && var->needed) {
......
484 484
    for (i = 0; i < c->n_variants; i++) {
485 485
        struct variant *var = c->variants[i];
486 486
        if (var->pb) {
487
            url_fclose(var->pb);
487
            avio_close(var->pb);
488 488
            var->pb = NULL;
489 489
        }
490 490
    }
......
558 558
    for (i = 0; i < c->n_variants; i++) {
559 559
        struct variant *var = c->variants[i];
560 560
        if (var->pb) {
561
            url_fclose(var->pb);
561
            avio_close(var->pb);
562 562
            var->pb = NULL;
563 563
        }
564 564
        av_free_packet(&var->pkt);

Also available in: Unified diff