shithub: libvpx

Download patch

ref: 518fc282f4f36f89f10e15a23dfc2ded5db294fa
parent: 7fd2561d646e40735e8e6b0f55798903dac4568d
parent: 47e784eab68f385b0f2bf85b1a495cd110850484
author: Yaowu Xu <yaowu@google.com>
date: Thu Oct 17 05:01:14 EDT 2013

Merge "Prevent first pass from outputing invalid info"

--- a/vpxenc.c
+++ b/vpxenc.c
@@ -2784,16 +2784,17 @@
   /* TODO(jkoleszar): This doesn't belong in this executable. Do it for now,
    * to match some existing utilities.
    */
-  FOREACH_STREAM({
-    FILE *f = fopen("opsnr.stt", "a");
-    if (stream->mismatch_seen) {
-      fprintf(f, "First mismatch occurred in frame %d\n",
-              stream->mismatch_seen);
-    } else {
-      fprintf(f, "No mismatch detected in recon buffers\n");
-    }
-    fclose(f);
-  });
+  if (!(global.pass == 1 && global.passes == 2))
+    FOREACH_STREAM({
+      FILE *f = fopen("opsnr.stt", "a");
+      if (stream->mismatch_seen) {
+        fprintf(f, "First mismatch occurred in frame %d\n",
+                stream->mismatch_seen);
+      } else {
+        fprintf(f, "No mismatch detected in recon buffers\n");
+      }
+      fclose(f);
+    });
 #endif
 
   vpx_img_free(&raw);