[x265] [PATCH] csv: fix header and data mismatch when we include comma in commandline

mahesh at multicorewareinc.com mahesh at multicorewareinc.com
Wed Oct 28 06:11:44 CET 2015


# HG changeset patch
# User Mahesh Pittala<mahesh at multicorewareinc.com>
# Date 1446009021 -19800
#      Wed Oct 28 10:40:21 2015 +0530
# Node ID 642fe0b48b7ce91e331f76694a7f66a061af8cfb
# Parent  6563218ce342c30bfd4f9bc172a1dab510e6e55b
csv: fix header and data mismatch when we include comma in commandline

diff -r 6563218ce342 -r 642fe0b48b7c source/x265-extras.cpp
--- a/source/x265-extras.cpp	Mon Oct 26 12:13:53 2015 +0530
+++ b/source/x265-extras.cpp	Wed Oct 28 10:40:21 2015 +0530
@@ -198,11 +198,13 @@
     }
 
     // CLI arguments or other
+    fputc('"', csvfp);
     for (int i = 1; i < argc; i++)
     {
-        if (i) fputc(' ', csvfp);
+        fputc(' ', csvfp);
         fputs(argv[i], csvfp);
     }
+    fputc('"', csvfp);
 
     // current date and time
     time_t now;


More information about the x265-devel mailing list