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

Generated by cgit