From: James Zern Date: Thu, 15 Aug 2013 01:28:42 +0000 (-0700) Subject: vpxenc: open output file after setting pass # X-Git-Tag: v1.3.0~604^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cb09719a35ab2285e68cdc5bed2ce58634806f1;p=libvpx vpxenc: open output file after setting pass # write_ivf_file_header would incorrectly skip writing the file header in the 2nd pass, causing the initial frame header to be overwritten on close potential causing an overly large frame header to be read and a crash. most likely broken since: 9e50ed7 vpxenc: initial implementation of multistream support fixes issue #585 Change-Id: I7e863e295dd6344c33b3e9c07f9f0394ec496e7b --- diff --git a/vpxenc.c b/vpxenc.c index 547b5722f..244ae073f 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -2631,8 +2631,8 @@ int main(int argc, const char **argv_) { &global.framerate)); } - FOREACH_STREAM(open_output_file(stream, &global)); FOREACH_STREAM(setup_pass(stream, &global, pass)); + FOREACH_STREAM(open_output_file(stream, &global)); FOREACH_STREAM(initialize_encoder(stream, &global)); frame_avail = 1;