]> granicus.if.org Git - libvpx/commitdiff
Merge "Prevent first pass from outputing invalid info"
authorYaowu Xu <yaowu@google.com>
Thu, 17 Oct 2013 16:01:14 +0000 (09:01 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 17 Oct 2013 16:01:14 +0000 (09:01 -0700)
vpxenc.c

index d7c6c0e3d16c7ac059091f5d8a69eb30e6c52938..aa99c6b7ce9c711d918b631065f7ccc39174269f 100644 (file)
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -2784,16 +2784,17 @@ int main(int argc, const char **argv_) {
   /* 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);