[libav-api] missing avio_open_dyn_packet_buf(), any work around?

Luca Barbato lu_zero at gentoo.org
Wed Apr 1 12:30:25 CEST 2015


On 31/03/15 16:26, Bernd Pfrommer wrote:
> For instance, the header packet is currently generated with this code:
> 
> AVFormatContext *ctx;
> int max_packet_size = whatever;
> uint8_t *data = NULL;
> 
> ffio_open_dyn_packet_buf(&(ctx->pb), max_packet_size); // <----------
> how to replace?
> avformat_write_header(ctx, NULL);
> avio_close_dyn_buf(ctx->pb, &data);
> 
> 
> How can I get this done without calling ffio_open_dyn_packet_buf() ?

avio_open_dyn_buf() the buffer will expand on demand.

lu


More information about the libav-api mailing list