unsigned char *buf = (unsigned char *)av_malloc(buf_size);
format_ctx->pb = avio_alloc_context(buf, buf_size, /*write_flag=*/false, opaque,
read_packet, /*write_packet=*/nullptr, /*seek=*/nullptr);
unsigned char *buf = (unsigned char *)av_malloc(buf_size);
format_ctx->pb = avio_alloc_context(buf, buf_size, /*write_flag=*/false, opaque,
read_packet, /*write_packet=*/nullptr, /*seek=*/nullptr);