[FFmpeg-devel] [PATCH] lavu: header and documentation for AVWriter

Leo Izen leo.izen at gmail.com
Tue Aug 30 22:33:24 EEST 2022


On 8/24/22 11:18, Nicolas George wrote:
> +```
> +        AVWriter wr = av_dynbuf_writer();
> +        av_something_write(wr, something, 0);
> +        if (av_writer_get_error(wr, 0) < 0)
> +            die("Failed");
> +        use_string(av_dynbuf_writer_get_data(wr, NULL));
> +        av_dynbuf_writer_finalize(wr, NULL, NULL);
> +```

Is there a reason this is AVWriter wr = foo() and not AVWriter *wr = 
foo()? Most other APIs return pointers to structs, rather than structs 
themselves (see: av_packet_alloc). Using a pointer would prevent us from 
having sizeof(AVWriter) as part of the ABI, as was done with AVPacket.

- Leo Izen (thebombzen)


More information about the ffmpeg-devel mailing list