shithub: openh264

Download patch

ref: 53dba96718d6daf64ed59f37c3f66be0574de060
parent: 153f833ce7f000999a73c02be290f81df9dd738b
author: Guangwei Wang <guangwwa@cisco.com>
date: Fri Dec 29 05:33:47 EST 2017

bugfix: reference before NULL check

--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -78,6 +78,8 @@
   FILE* pOptionFile = NULL;
 // Lenght input mode support
   FILE* fpTrack = NULL;
+  if (pDecoder == NULL) return;
+
   if (pLengthFileName != NULL) {
     fpTrack = fopen (pLengthFileName, "rb");
     if (fpTrack == NULL)
@@ -109,7 +111,6 @@
   CUtils cOutputModule;
   double dElapsed = 0;
 
-  if (pDecoder == NULL) return;
   if (kpH264FileName) {
     pH264File = fopen (kpH264FileName, "rb");
     if (pH264File == NULL) {