]> git.sesse.net Git - ffmpeg/commit
avformat/webm_chunk: Open AVIOContext before initializing sub-muxer
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 17 May 2020 19:37:42 +0000 (21:37 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 23 May 2020 05:15:35 +0000 (07:15 +0200)
commitaef670cff4d8856a99451995aff6d77a2f20403f
tree3744658b0a4a669e92a78314cd5002b95035ffea
parenta5572f5a80abdf71c222926dc163182aec84e105
avformat/webm_chunk: Open AVIOContext before initializing sub-muxer

The description of AVOutputFormat.init contains the statement that "this
method must not write output". Due to this, the webm_chunk muxer defers
opening the AVIOContext for the child muxer until avformat_write_header(),
i.e. there is no AVIOContext when the sub-muxer's avformat_init_output()
is called. But this violates the documentation of said function which
requires the AVFormatContext to have an already opened AVIOContext.
This commit fixes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/webm_chunk.c