From: John Koleszar Date: Mon, 14 Jun 2010 12:33:54 +0000 (-0400) Subject: ivfenc: fix two-pass support of raw files X-Git-Tag: v0.9.1~13^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df2c62d35782442b621388be8adba32a709afb1a;p=libvpx ivfenc: fix two-pass support of raw files Commit 3245d46 "ivfenc: support reading/writing from a pipe" broke support for two pass encodes of raw files when done in two invocations of ivfenc. The raw image was only set up on pass 0, which was never hit when running with --pass=2 --passes=2. Change-Id: I6a9858be1a8998d5bd45331123b46b1baa05b379 --- diff --git a/ivfenc.c b/ivfenc.c index b13db6522..e9a49cddd 100644 --- a/ivfenc.c +++ b/ivfenc.c @@ -950,7 +950,7 @@ int main(int argc, const char **argv_) SHOW(kf_max_dist); } - if(pass == 0) { + if(pass == (one_pass_only ? one_pass_only - 1 : 0)) { if (file_type == FILE_TYPE_Y4M) /*The Y4M reader does its own allocation. Just initialize this here to avoid problems if we never read any