Unified · Split
| @@ -872,7 +872,7 @@ static void close_connection(HTTPContext *c) · 871 unmodified lines | ||
| 872 | 872 | if (avio_open_dyn_buf(&ctx->pb) >= 0) { |
| 873 | 873 | av_write_trailer(ctx); |
| 874 | 874 | av_freep(&c->pb_buffer); |
| 875 | − url_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 875 | + avio_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 876 | 876 | } |
| 877 | 877 | } |
| 878 | 878 | } |
| @@ -2101,7 +2101,7 @@ static void compute_status(HTTPContext *c) · 1222 unmodified lines | ||
| 2101 | 2101 | avio_printf(pb, "<hr size=1 noshade>Generated at %s", p); |
| 2102 | 2102 | avio_printf(pb, "</body>\n</html>\n"); |
| 2103 | 2103 | |
| 2104 | − len = url_close_dyn_buf(pb, &c->pb_buffer); | |
| 2104 | + len = avio_close_dyn_buf(pb, &c->pb_buffer); | |
| 2105 | 2105 | c->buffer_ptr = c->pb_buffer; |
| 2106 | 2106 | c->buffer_end = c->pb_buffer + len; |
| 2107 | 2107 | } |
| @@ -2277,7 +2277,7 @@ static int http_prepare_data(HTTPContext *c) · 169 unmodified lines | ||
| 2277 | 2277 | } |
| 2278 | 2278 | av_metadata_free(&c->fmt_ctx.metadata); |
| 2279 | 2279 | |
| 2280 | − len = url_close_dyn_buf(c->fmt_ctx.pb, &c->pb_buffer); | |
| 2280 | + len = avio_close_dyn_buf(c->fmt_ctx.pb, &c->pb_buffer); | |
| 2281 | 2281 | c->buffer_ptr = c->pb_buffer; |
| 2282 | 2282 | c->buffer_end = c->pb_buffer + len; |
| 2283 | 2283 | |
| @@ -2410,7 +2410,7 @@ static int http_prepare_data(HTTPContext *c) · 126 unmodified lines | ||
| 2410 | 2410 | c->state = HTTPSTATE_SEND_DATA_TRAILER; |
| 2411 | 2411 | } |
| 2412 | 2412 | |
| 2413 | − len = url_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 2413 | + len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 2414 | 2414 | c->cur_frame_bytes = len; |
| 2415 | 2415 | c->buffer_ptr = c->pb_buffer; |
| 2416 | 2416 | c->buffer_end = c->pb_buffer + len; |
| @@ -2438,7 +2438,7 @@ static int http_prepare_data(HTTPContext *c) · 21 unmodified lines | ||
| 2438 | 2438 | } |
| 2439 | 2439 | c->fmt_ctx.pb->seekable = 0; |
| 2440 | 2440 | av_write_trailer(ctx); |
| 2441 | − len = url_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 2441 | + len = avio_close_dyn_buf(ctx->pb, &c->pb_buffer); | |
| 2442 | 2442 | c->buffer_ptr = c->pb_buffer; |
| 2443 | 2443 | c->buffer_end = c->pb_buffer + len; |
| 2444 | 2444 | |
| @@ -2518,7 +2518,7 @@ static int http_send_data(HTTPContext *c) · 73 unmodified lines | ||
| 2518 | 2518 | /* write RTP packet data */ |
| 2519 | 2519 | c->buffer_ptr += 4; |
| 2520 | 2520 | avio_write(pb, c->buffer_ptr, len); |
| 2521 | − size = url_close_dyn_buf(pb, &c->packet_buffer); | |
| 2521 | + size = avio_close_dyn_buf(pb, &c->packet_buffer); | |
| 2522 | 2522 | /* prepare asynchronous TCP sending */ |
| 2523 | 2523 | rtsp_c->packet_buffer_ptr = c->packet_buffer; |
| 2524 | 2524 | rtsp_c->packet_buffer_end = c->packet_buffer + size; |
| @@ -2907,7 +2907,7 @@ static int rtsp_parse_request(HTTPContext *c) · 382 unmodified lines | ||
| 2907 | 2907 | rtsp_reply_error(c, RTSP_STATUS_METHOD); |
| 2908 | 2908 | |
| 2909 | 2909 | the_end: |
| 2910 | − len = url_close_dyn_buf(c->pb, &c->pb_buffer); | |
| 2910 | + len = avio_close_dyn_buf(c->pb, &c->pb_buffer); | |
| 2911 | 2911 | c->pb = NULL; /* safety */ |
| 2912 | 2912 | if (len < 0) { |
| 2913 | 2913 | /* XXX: cannot do more */ |
| @@ -3456,7 +3456,7 @@ static int rtp_new_av_stream(HTTPContext *c, · 542 unmodified lines | ||
| 3456 | 3456 | av_free(ctx); |
| 3457 | 3457 | return -1; |
| 3458 | 3458 | } |
| 3459 | − url_close_dyn_buf(ctx->pb, &dummy_buf); | |
| 3459 | + avio_close_dyn_buf(ctx->pb, &dummy_buf); | |
| 3460 | 3460 | av_free(dummy_buf); |
| 3461 | 3461 | |
| 3462 | 3462 | c->rtp_ctx[stream_index] = ctx; |
| @@ -238,7 +238,7 @@ static void put_str16(AVIOContext *s, const char *tag) · 237 unmodified lines | ||
| 238 | 238 | return; |
| 239 | 239 | |
| 240 | 240 | avio_put_str16le(dyn_buf, tag); |
| 241 | − len = url_close_dyn_buf(dyn_buf, &pb); | |
| 241 | + len = avio_close_dyn_buf(dyn_buf, &pb); | |
| 242 | 242 | avio_wl16(s, len); |
| 243 | 243 | avio_write(s, pb, len); |
| 244 | 244 | av_freep(&pb); |
| @@ -375,7 +375,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 130 unmodified lines | ||
| 375 | 375 | len = tags[n] ? avio_put_str16le(dyn_buf, tags[n]->value) : 0; |
| 376 | 376 | avio_wl16(pb, len); |
| 377 | 377 | } |
| 378 | − len = url_close_dyn_buf(dyn_buf, &buf); | |
| 378 | + len = avio_close_dyn_buf(dyn_buf, &buf); | |
| 379 | 379 | avio_write(pb, buf, len); |
| 380 | 380 | av_freep(&buf); |
| 381 | 381 | end_header(pb, hpos); |
| @@ -501,7 +501,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data · 119 unmodified lines | ||
| 501 | 501 | return AVERROR(ENOMEM); |
| 502 | 502 | |
| 503 | 503 | avio_put_str16le(dyn_buf, desc); |
| 504 | − len = url_close_dyn_buf(dyn_buf, &buf); | |
| 504 | + len = avio_close_dyn_buf(dyn_buf, &buf); | |
| 505 | 505 | avio_wl16(pb, len / 2); // "number of characters" = length in bytes / 2 |
| 506 | 506 | |
| 507 | 507 | avio_write(pb, buf, len); |
| @@ -96,7 +96,7 @@ int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size) · 95 unmodified lines | ||
| 96 | 96 | ff_avc_parse_nal_units(pb, buf_in, *size); |
| 97 | 97 | |
| 98 | 98 | av_freep(buf); |
| 99 | − *size = url_close_dyn_buf(pb, buf); | |
| 99 | + *size = avio_close_dyn_buf(pb, buf); | |
| 100 | 100 | return 0; |
| 101 | 101 | } |
| 102 | 102 | |
| @@ -448,6 +448,7 @@ attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...); · 447 unmodified lines | ||
| 448 | 448 | #endif |
| 449 | 449 | attribute_deprecated void put_flush_packet(AVIOContext *s); |
| 450 | 450 | attribute_deprecated int url_open_dyn_buf(AVIOContext **s); |
| 451 | +attribute_deprecated int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); | |
| 451 | 452 | /** |
| 452 | 453 | * @} |
| 453 | 454 | */ |
| @@ -704,7 +705,7 @@ int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); · 250 unmodified lines | ||
| 704 | 705 | * @param pbuffer pointer to a byte buffer |
| 705 | 706 | * @return the length of the byte buffer |
| 706 | 707 | */ |
| 707 | −int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); | |
| 708 | +int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); | |
| 708 | 709 | |
| 709 | 710 | #if FF_API_UDP_GET_FILE |
| 710 | 711 | int udp_get_file_handle(URLContext *h); |
| @@ -423,6 +423,10 @@ int url_open_dyn_buf(AVIOContext **s) · 422 unmodified lines | ||
| 423 | 423 | { |
| 424 | 424 | return avio_open_dyn_buf(s); |
| 425 | 425 | } |
| 426 | +int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer) | |
| 427 | +{ | |
| 428 | + return avio_close_dyn_buf(s, pbuffer); | |
| 429 | +} | |
| 426 | 430 | #endif |
| 427 | 431 | |
| 428 | 432 | int avio_put_str(AVIOContext *s, const char *str) |
| @@ -1027,7 +1031,7 @@ int64_t ffio_read_seek(AVIOContext *s, int stream_index, · 598 unmodified lines | ||
| 1027 | 1031 | return ret; |
| 1028 | 1032 | } |
| 1029 | 1033 | |
| 1030 | −/* avio_open_dyn_buf and url_close_dyn_buf are used in rtp.c to send a response | |
| 1034 | +/* avio_open_dyn_buf and avio_close_dyn_buf are used in rtp.c to send a response | |
| 1031 | 1035 | * back to the server even if CONFIG_MUXERS is false. */ |
| 1032 | 1036 | #if CONFIG_MUXERS || CONFIG_NETWORK |
| 1033 | 1037 | /* buffer handling */ |
| @@ -1163,7 +1167,7 @@ int url_open_dyn_packet_buf(AVIOContext **s, int max_packet_size) · 129 unmodified lines | ||
| 1163 | 1167 | return url_open_dyn_buf_internal(s, max_packet_size); |
| 1164 | 1168 | } |
| 1165 | 1169 | |
| 1166 | −int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer) | |
| 1170 | +int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer) | |
| 1167 | 1171 | { |
| 1168 | 1172 | DynBuffer *d = s->opaque; |
| 1169 | 1173 | int size; |
| @@ -498,7 +498,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo · 497 unmodified lines | ||
| 498 | 498 | ff_put_wav_header(dyn_cp, codec); |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | − codecpriv_size = url_close_dyn_buf(dyn_cp, &codecpriv); | |
| 501 | + codecpriv_size = avio_close_dyn_buf(dyn_cp, &codecpriv); | |
| 502 | 502 | if (codecpriv_size) |
| 503 | 503 | put_ebml_binary(pb, MATROSKA_ID_CODECPRIVATE, codecpriv, codecpriv_size); |
| 504 | 504 | av_free(codecpriv); |
| @@ -1003,7 +1003,7 @@ static void mkv_flush_dynbuf(AVFormatContext *s) · 498 unmodified lines | ||
| 1003 | 1003 | if (!mkv->dyn_bc) |
| 1004 | 1004 | return; |
| 1005 | 1005 | |
| 1006 | − bufsize = url_close_dyn_buf(mkv->dyn_bc, &dyn_buf); | |
| 1006 | + bufsize = avio_close_dyn_buf(mkv->dyn_bc, &dyn_buf); | |
| 1007 | 1007 | avio_write(s->pb, dyn_buf, bufsize); |
| 1008 | 1008 | av_free(dyn_buf); |
| 1009 | 1009 | mkv->dyn_bc = NULL; |
| @@ -1691,7 +1691,7 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov, · 1690 unmodified lines | ||
| 1691 | 1691 | if (s->nb_chapters) |
| 1692 | 1692 | mov_write_chpl_tag(pb_buf, s); |
| 1693 | 1693 | |
| 1694 | − if ((size = url_close_dyn_buf(pb_buf, &buf)) > 0) { | |
| 1694 | + if ((size = avio_close_dyn_buf(pb_buf, &buf)) > 0) { | |
| 1695 | 1695 | avio_wb32(pb, size+8); |
| 1696 | 1696 | ffio_wfourcc(pb, "udta"); |
| 1697 | 1697 | avio_write(pb, buf, size); |
| @@ -408,7 +408,7 @@ int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, · 407 unmodified lines | ||
| 408 | 408 | |
| 409 | 409 | /* Fetch the output from the RTP muxer, open a new output buffer |
| 410 | 410 | * for next time. */ |
| 411 | − size = url_close_dyn_buf(rtp_ctx->pb, &buf); | |
| 411 | + size = avio_close_dyn_buf(rtp_ctx->pb, &buf); | |
| 412 | 412 | if ((ret = url_open_dyn_packet_buf(&rtp_ctx->pb, |
| 413 | 413 | RTP_MAX_PACKET_SIZE)) < 0) |
| 414 | 414 | goto done; |
| @@ -424,7 +424,7 @@ int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt, · 9 unmodified lines | ||
| 424 | 424 | av_freep(&buf); |
| 425 | 425 | |
| 426 | 426 | /* Write the hint data into the hint track */ |
| 427 | − hint_pkt.size = size = url_close_dyn_buf(hintbuf, &buf); | |
| 427 | + hint_pkt.size = size = avio_close_dyn_buf(hintbuf, &buf); | |
| 428 | 428 | hint_pkt.data = buf; |
| 429 | 429 | hint_pkt.pts = hint_pkt.dts; |
| 430 | 430 | hint_pkt.stream_index = track_index; |
| @@ -448,7 +448,7 @@ void ff_mov_close_hinting(MOVTrack *track) { · 17 unmodified lines | ||
| 448 | 448 | return; |
| 449 | 449 | if (rtp_ctx->pb) { |
| 450 | 450 | av_write_trailer(rtp_ctx); |
| 451 | − url_close_dyn_buf(rtp_ctx->pb, &ptr); | |
| 451 | + avio_close_dyn_buf(rtp_ctx->pb, &ptr); | |
| 452 | 452 | av_free(ptr); |
| 453 | 453 | } |
| 454 | 454 | avformat_free_context(rtp_ctx); |
| @@ -115,7 +115,7 @@ static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2 · 114 unmodified lines | ||
| 115 | 115 | put(dyn_buf, str1); |
| 116 | 116 | if (str2) |
| 117 | 117 | put(dyn_buf, str2); |
| 118 | − len = url_close_dyn_buf(dyn_buf, &pb); | |
| 118 | + len = avio_close_dyn_buf(dyn_buf, &pb); | |
| 119 | 119 | |
| 120 | 120 | avio_wb32(s->pb, tag); |
| 121 | 121 | id3v2_put_size(s, len); |
| @@ -281,7 +281,7 @@ static inline void put_s_trace(AVIOContext *bc, int64_t v, char *file, char *fun · 280 unmodified lines | ||
| 281 | 281 | //FIXME remove calculate_checksum |
| 282 | 282 | static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, int calculate_checksum, uint64_t startcode){ |
| 283 | 283 | uint8_t *dyn_buf=NULL; |
| 284 | − int dyn_size= url_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 284 | + int dyn_size= avio_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 285 | 285 | int forw_ptr= dyn_size + 4*calculate_checksum; |
| 286 | 286 | |
| 287 | 287 | if(forw_ptr > 4096) |
| @@ -450,7 +450,7 @@ static int write_globalinfo(NUTContext *nut, AVIOContext *bc){ · 162 unmodified lines | ||
| 450 | 450 | |
| 451 | 451 | ff_put_v(bc, count); |
| 452 | 452 | |
| 453 | − dyn_size= url_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 453 | + dyn_size= avio_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 454 | 454 | avio_write(bc, dyn_buf, dyn_size); |
| 455 | 455 | av_free(dyn_buf); |
| 456 | 456 | return 0; |
| @@ -470,7 +470,7 @@ static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id){ · 13 unmodified lines | ||
| 470 | 470 | if (st->disposition & ff_nut_dispositions[i].flag) |
| 471 | 471 | count += add_info(dyn_bc, "Disposition", ff_nut_dispositions[i].str); |
| 472 | 472 | } |
| 473 | − dyn_size = url_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 473 | + dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 474 | 474 | |
| 475 | 475 | if (count) { |
| 476 | 476 | ff_put_v(bc, stream_id + 1); //stream_id_plus1 |
| @@ -509,7 +509,7 @@ static int write_chapter(NUTContext *nut, AVIOContext *bc, int id) · 32 unmodified lines | ||
| 509 | 509 | |
| 510 | 510 | ff_put_v(bc, count); |
| 511 | 511 | |
| 512 | − dyn_size = url_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 512 | + dyn_size = avio_close_dyn_buf(dyn_bc, &dyn_buf); | |
| 513 | 513 | avio_write(bc, dyn_buf, dyn_size); |
| 514 | 514 | av_freep(&dyn_buf); |
| 515 | 515 | return 0; |
| @@ -554,7 +554,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){ · 38 unmodified lines | ||
| 554 | 554 | put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE); |
| 555 | 555 | else { |
| 556 | 556 | uint8_t* buf; |
| 557 | − url_close_dyn_buf(dyn_bc, &buf); | |
| 557 | + avio_close_dyn_buf(dyn_bc, &buf); | |
| 558 | 558 | av_free(buf); |
| 559 | 559 | } |
| 560 | 560 | } |
| @@ -566,7 +566,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){ · 5 unmodified lines | ||
| 566 | 566 | ret = write_chapter(nut, dyn_bc, i); |
| 567 | 567 | if (ret < 0) { |
| 568 | 568 | uint8_t *buf; |
| 569 | − url_close_dyn_buf(dyn_bc, &buf); | |
| 569 | + avio_close_dyn_buf(dyn_bc, &buf); | |
| 570 | 570 | av_freep(&buf); |
| 571 | 571 | return ret; |
| 572 | 572 | } |
| @@ -101,7 +101,7 @@ static int ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags) · 100 unmodified lines | ||
| 101 | 101 | ogg_update_checksum(s, pb, crc_offset); |
| 102 | 102 | avio_flush(pb); |
| 103 | 103 | |
| 104 | − size = url_close_dyn_buf(pb, &buf); | |
| 104 | + size = avio_close_dyn_buf(pb, &buf); | |
| 105 | 105 | if (size < 0) |
| 106 | 106 | return size; |
| 107 | 107 | |
| @@ -321,7 +321,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count) · 320 unmodified lines | ||
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | avio_flush(pb); |
| 324 | − len = url_close_dyn_buf(pb, &buf); | |
| 324 | + len = avio_close_dyn_buf(pb, &buf); | |
| 325 | 325 | if ((len > 0) && buf) { |
| 326 | 326 | int result; |
| 327 | 327 | av_dlog(s->ic, "sending %d bytes of RR\n", len); |
| @@ -349,7 +349,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle) · 21 unmodified lines | ||
| 349 | 349 | avio_wb32(pb, 0); /* SSRC */ |
| 350 | 350 | |
| 351 | 351 | avio_flush(pb); |
| 352 | − len = url_close_dyn_buf(pb, &buf); | |
| 352 | + len = avio_close_dyn_buf(pb, &buf); | |
| 353 | 353 | if ((len > 0) && buf) |
| 354 | 354 | url_write(rtp_handle, buf, len); |
| 355 | 355 | av_free(buf); |
| @@ -364,7 +364,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle) · 8 unmodified lines | ||
| 364 | 364 | avio_wb32(pb, 0); /* our own SSRC */ |
| 365 | 365 | |
| 366 | 366 | avio_flush(pb); |
| 367 | − len = url_close_dyn_buf(pb, &buf); | |
| 367 | + len = avio_close_dyn_buf(pb, &buf); | |
| 368 | 368 | if ((len > 0) && buf) |
| 369 | 369 | url_write(rtp_handle, buf, len); |
| 370 | 370 | av_free(buf); |
| @@ -203,7 +203,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, · 202 unmodified lines | ||
| 203 | 203 | */ |
| 204 | 204 | if (asf->pktbuf && len_off != avio_tell(asf->pktbuf)) { |
| 205 | 205 | uint8_t *p; |
| 206 | − url_close_dyn_buf(asf->pktbuf, &p); | |
| 206 | + avio_close_dyn_buf(asf->pktbuf, &p); | |
| 207 | 207 | asf->pktbuf = NULL; |
| 208 | 208 | av_free(p); |
| 209 | 209 | } |
| @@ -217,7 +217,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, · 7 unmodified lines | ||
| 217 | 217 | avio_skip(pb, len - off); |
| 218 | 218 | if (!(flags & RTP_FLAG_MARKER)) |
| 219 | 219 | return -1; |
| 220 | − out_len = url_close_dyn_buf(asf->pktbuf, &asf->buf); | |
| 220 | + out_len = avio_close_dyn_buf(asf->pktbuf, &asf->buf); | |
| 221 | 221 | asf->pktbuf = NULL; |
| 222 | 222 | } else { |
| 223 | 223 | /** |
| @@ -272,7 +272,7 @@ static void asfrtp_free_context(PayloadContext *asf) · 48 unmodified lines | ||
| 272 | 272 | { |
| 273 | 273 | if (asf->pktbuf) { |
| 274 | 274 | uint8_t *p = NULL; |
| 275 | − url_close_dyn_buf(asf->pktbuf, &p); | |
| 275 | + avio_close_dyn_buf(asf->pktbuf, &p); | |
| 276 | 276 | asf->pktbuf = NULL; |
| 277 | 277 | av_free(p); |
| 278 | 278 | } |
| @@ -43,7 +43,7 @@ static void latm_free_context(PayloadContext *data) · 42 unmodified lines | ||
| 43 | 43 | return; |
| 44 | 44 | if (data->dyn_buf) { |
| 45 | 45 | uint8_t *p; |
| 46 | − url_close_dyn_buf(data->dyn_buf, &p); | |
| 46 | + avio_close_dyn_buf(data->dyn_buf, &p); | |
| 47 | 47 | av_free(p); |
| 48 | 48 | } |
| 49 | 49 | av_free(data->buf); |
| @@ -60,7 +60,7 @@ static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data, · 10 unmodified lines | ||
| 60 | 60 | if (!data->dyn_buf || data->timestamp != *timestamp) { |
| 61 | 61 | av_freep(&data->buf); |
| 62 | 62 | if (data->dyn_buf) |
| 63 | − url_close_dyn_buf(data->dyn_buf, &data->buf); | |
| 63 | + avio_close_dyn_buf(data->dyn_buf, &data->buf); | |
| 64 | 64 | data->dyn_buf = NULL; |
| 65 | 65 | av_freep(&data->buf); |
| 66 | 66 | |
| @@ -73,7 +73,7 @@ static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data, · 6 unmodified lines | ||
| 73 | 73 | if (!(flags & RTP_FLAG_MARKER)) |
| 74 | 74 | return AVERROR(EAGAIN); |
| 75 | 75 | av_free(data->buf); |
| 76 | − data->len = url_close_dyn_buf(data->dyn_buf, &data->buf); | |
| 76 | + data->len = avio_close_dyn_buf(data->dyn_buf, &data->buf); | |
| 77 | 77 | data->dyn_buf = NULL; |
| 78 | 78 | data->pos = 0; |
| 79 | 79 | } |
| @@ -83,7 +83,7 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, · 82 unmodified lines | ||
| 83 | 83 | |
| 84 | 84 | if (sv->pktbuf) { |
| 85 | 85 | uint8_t *tmp; |
| 86 | − url_close_dyn_buf(sv->pktbuf, &tmp); | |
| 86 | + avio_close_dyn_buf(sv->pktbuf, &tmp); | |
| 87 | 87 | av_free(tmp); |
| 88 | 88 | } |
| 89 | 89 | if ((res = avio_open_dyn_buf(&sv->pktbuf)) < 0) |
| @@ -100,7 +100,7 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, · 10 unmodified lines | ||
| 100 | 100 | av_init_packet(pkt); |
| 101 | 101 | pkt->stream_index = st->index; |
| 102 | 102 | *timestamp = sv->timestamp; |
| 103 | − pkt->size = url_close_dyn_buf(sv->pktbuf, &pkt->data); | |
| 103 | + pkt->size = avio_close_dyn_buf(sv->pktbuf, &pkt->data); | |
| 104 | 104 | pkt->destruct = av_destruct_packet; |
| 105 | 105 | sv->pktbuf = NULL; |
| 106 | 106 | return 0; |
| @@ -118,7 +118,7 @@ static void svq3_extradata_free(PayloadContext *sv) · 11 unmodified lines | ||
| 118 | 118 | { |
| 119 | 119 | if (sv->pktbuf) { |
| 120 | 120 | uint8_t *buf; |
| 121 | − url_close_dyn_buf(sv->pktbuf, &buf); | |
| 121 | + avio_close_dyn_buf(sv->pktbuf, &buf); | |
| 122 | 122 | av_free(buf); |
| 123 | 123 | } |
| 124 | 124 | av_free(sv); |
| @@ -41,7 +41,7 @@ static void prepare_packet(AVPacket *pkt, PayloadContext *vp8, int stream) · 40 unmodified lines | ||
| 41 | 41 | av_init_packet(pkt); |
| 42 | 42 | pkt->stream_index = stream; |
| 43 | 43 | pkt->flags = vp8->is_keyframe ? AV_PKT_FLAG_KEY : 0; |
| 44 | − pkt->size = url_close_dyn_buf(vp8->data, &pkt->data); | |
| 44 | + pkt->size = avio_close_dyn_buf(vp8->data, &pkt->data); | |
| 45 | 45 | pkt->destruct = av_destruct_packet; |
| 46 | 46 | vp8->data = NULL; |
| 47 | 47 | } |
| @@ -138,7 +138,7 @@ static void vp8_free_context(PayloadContext *vp8) · 90 unmodified lines | ||
| 138 | 138 | { |
| 139 | 139 | if (vp8->data) { |
| 140 | 140 | uint8_t *tmp; |
| 141 | − url_close_dyn_buf(vp8->data, &tmp); | |
| 141 | + avio_close_dyn_buf(vp8->data, &tmp); | |
| 142 | 142 | av_free(tmp); |
| 143 | 143 | } |
| 144 | 144 | av_free(vp8); |
| @@ -57,7 +57,7 @@ static inline void free_fragment_if_needed(PayloadContext * data) · 56 unmodified lines | ||
| 57 | 57 | { |
| 58 | 58 | if (data->fragment) { |
| 59 | 59 | uint8_t* p; |
| 60 | − url_close_dyn_buf(data->fragment, &p); | |
| 60 | + avio_close_dyn_buf(data->fragment, &p); | |
| 61 | 61 | av_free(p); |
| 62 | 62 | data->fragment = NULL; |
| 63 | 63 | } |
| @@ -203,7 +203,7 @@ static int xiph_handle_packet(AVFormatContext * ctx, · 139 unmodified lines | ||
| 203 | 203 | if (fragmented == 3) { |
| 204 | 204 | // end of xiph data packet |
| 205 | 205 | av_init_packet(pkt); |
| 206 | − pkt->size = url_close_dyn_buf(data->fragment, &pkt->data); | |
| 206 | + pkt->size = avio_close_dyn_buf(data->fragment, &pkt->data); | |
| 207 | 207 | |
| 208 | 208 | if (pkt->size < 0) { |
| 209 | 209 | av_log(ctx, AV_LOG_ERROR, |
| @@ -63,7 +63,7 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st, · 62 unmodified lines | ||
| 63 | 63 | avio_close(rtpctx->pb); |
| 64 | 64 | } else { |
| 65 | 65 | uint8_t *ptr; |
| 66 | − url_close_dyn_buf(rtpctx->pb, &ptr); | |
| 66 | + avio_close_dyn_buf(rtpctx->pb, &ptr); | |
| 67 | 67 | av_free(ptr); |
| 68 | 68 | } |
| 69 | 69 | avformat_free_context(rtpctx); |
| @@ -495,7 +495,7 @@ void ff_rtsp_undo_setup(AVFormatContext *s) · 494 unmodified lines | ||
| 495 | 495 | av_write_trailer(rtpctx); |
| 496 | 496 | if (rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP) { |
| 497 | 497 | uint8_t *ptr; |
| 498 | − url_close_dyn_buf(rtpctx->pb, &ptr); | |
| 498 | + avio_close_dyn_buf(rtpctx->pb, &ptr); | |
| 499 | 499 | av_free(ptr); |
| 500 | 500 | } else { |
| 501 | 501 | avio_close(rtpctx->pb); |
| @@ -135,7 +135,7 @@ static int tcp_write_packet(AVFormatContext *s, RTSPStream *rtsp_st) · 134 unmodified lines | ||
| 135 | 135 | int size; |
| 136 | 136 | uint8_t *interleave_header, *interleaved_packet; |
| 137 | 137 | |
| 138 | − size = url_close_dyn_buf(rtpctx->pb, &buf); | |
| 138 | + size = avio_close_dyn_buf(rtpctx->pb, &buf); | |
| 139 | 139 | ptr = buf; |
| 140 | 140 | while (size > 4) { |
| 141 | 141 | uint32_t packet_len = AV_RB32(ptr); |