On 11/24/2017 8:19 AM, Carl Eugen Hoyos wrote: > 2017-11-24 4:38 GMT+01:00 James Almer <jamr...@gmail.com>: >> Signed-off-by: James Almer <jamr...@gmail.com> >> --- >> Simpler/smaller diff. > > Sorry if this is obvious: > What is the advantage of having these new functions? > > Carl Eugen
Muxers with an init() function can be initialized before the header is written. deinit() is mainly meant to free any allocated buffer in init() in case the latter fails, but should ideally also be used to free what would otherwise be freed in write_trailer(). API users can know if muxing is possible and in some cases have the output streams initialized with container specific parameters by calling avformat_init_output() before avformat_write_header() with the above functions. ffmpeg.c should ideally be doing the above, so we can remove all the delayed header writing code in libavformat/mux.c (see the patch i sent for the latter some time ago). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel