shithub: openh264

Download patch

ref: ec576baf252f8d2848639d68edd1964d9bd3e212
parent: b58bf88b44d65fc2f86637ada37327d188fdb6d9
parent: 19f03d6a263eea5b49366150d3d23b22098bf54c
author: Ethan Hugg <ethanhugg@gmail.com>
date: Tue Jan 28 06:05:31 EST 2014

Merge pull request #249 from mstorsjo/encconsole-arg-parsing-ifdef

Fix parsing of the -drec option if ENABLE_FRAME_DUMP isn't set

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -562,8 +562,9 @@
 #ifdef ENABLE_FRAME_DUMP
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->sRecFileName[iLen] = '\0';
-      strncpy (pDLayer->sRecFileName, argv[n++], iLen);	// confirmed_safe_unsafe_usage
+      strncpy (pDLayer->sRecFileName, argv[n], iLen);	// confirmed_safe_unsafe_usage
 #endif//ENABLE_FRAME_DUMP
+      n++;
     }
 
     else if (!strcmp (pCommand, "-sw") && (n + 1 < argc)) {