shithub: openh264

Download patch

ref: 1bccef940c28f6eef637daca22f3e89b2b57b117
parent: 4f1ea1c4f85604ce178ebe9474f831c33fef18cd
author: Martin Storsjö <[email protected]>
date: Tue Jun 10 11:30:35 EDT 2014

Read the right command line arguments in h264dec.cpp

pArgV[i++] evalates to the same string as cmd (which is
pArgV[i]); we need to increment i before indexing into
pArgV again.

--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -384,7 +384,7 @@
 
         if (!strcmp (cmd, "-options")) {
           if (i + 1 < iArgC)
-            strOptionFile = pArgV[i++];
+            strOptionFile = pArgV[++i];
           else {
             printf ("options file not specified.\n");
             return 1;
@@ -391,7 +391,7 @@
           }
         } else if (!strcmp (cmd, "-trace")) {
           if (i + 1 < iArgC)
-            WelsStderrSetTraceLevel (atoi (pArgV[i++]));
+            WelsStderrSetTraceLevel (atoi (pArgV[++i]));
           else {
             printf ("trace level not specified.\n");
             return 1;