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