1*4882a593SmuzhiyunFrom 855e9674232808ff3be7191b697dfb56917db21f Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> 3*4882a593SmuzhiyunDate: Wed, 8 Feb 2017 00:56:32 +0000 4*4882a593SmuzhiyunSubject: [PATCH] Fix GCC7 build 5*4882a593Smuzhiyun 6*4882a593Smuzhiyunif (*pSlash != '\0') { 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunAs it stands the body of that if will always execute and when there are 9*4882a593Smuzhiyunno encoding parameters ppEncodingParams will be returned as a pointer to 10*4882a593Smuzhiyunan empty string rather than as a null pointer 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunSigned-off-by: Peter Korsgaard <peter@korsgaard.com> 13*4882a593Smuzhiyun[Upstream status: https://github.com/TechSmith/mp4v2/pull/36] 14*4882a593Smuzhiyun--- 15*4882a593Smuzhiyun src/rtphint.cpp | 2 +- 16*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-) 17*4882a593Smuzhiyun 18*4882a593Smuzhiyundiff --git a/src/rtphint.cpp b/src/rtphint.cpp 19*4882a593Smuzhiyunindex e07309d..1eb01f5 100644 20*4882a593Smuzhiyun--- a/src/rtphint.cpp 21*4882a593Smuzhiyun+++ b/src/rtphint.cpp 22*4882a593Smuzhiyun@@ -339,7 +339,7 @@ void MP4RtpHintTrack::GetPayload( 23*4882a593Smuzhiyun pSlash = strchr(pSlash, '/'); 24*4882a593Smuzhiyun if (pSlash != NULL) { 25*4882a593Smuzhiyun pSlash++; 26*4882a593Smuzhiyun- if (pSlash != '\0') { 27*4882a593Smuzhiyun+ if (*pSlash != '\0') { 28*4882a593Smuzhiyun length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap); 29*4882a593Smuzhiyun *ppEncodingParams = (char *)MP4Calloc(length + 1); 30*4882a593Smuzhiyun strncpy(*ppEncodingParams, pSlash, length); 31*4882a593Smuzhiyun-- 32*4882a593Smuzhiyun2.11.0 33*4882a593Smuzhiyun 34