1*4882a593SmuzhiyunFrom 78cf76b5d661e37e958163c37c0ad95940c09591 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3*4882a593SmuzhiyunDate: Sat, 30 May 2020 11:42:19 +0200 4*4882a593SmuzhiyunSubject: [PATCH] src/mp4track.cpp: replace nullptr by NULL 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunCommit 15ec11166ba9ee7b77631d0d9234522f656cfd66 added code that uses 7*4882a593Smuzhiyunnullptr. nullptr is C++11, it will break the build with gcc < 5. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSemantically, NULL and nullptr are different, so should not be mixed. 10*4882a593SmuzhiyunIn this situaiton, m_File.FindAtom() indeed does not return nullptr, 11*4882a593Smuzhiyunbut NULL (on error, that is). 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSwitch back to comparing against NULL. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunFixes: 16*4882a593Smuzhiyun - http://autobuild.buildroot.org/results/14937c96a82fb3d10e5d83bd7b2905b846fb09f9 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 19*4882a593Smuzhiyun[Upstream status: not sent yet] 20*4882a593Smuzhiyun--- 21*4882a593Smuzhiyun src/mp4track.cpp | 6 +++--- 22*4882a593Smuzhiyun 1 file changed, 3 insertions(+), 3 deletions(-) 23*4882a593Smuzhiyun 24*4882a593Smuzhiyundiff --git a/src/mp4track.cpp b/src/mp4track.cpp 25*4882a593Smuzhiyunindex 4b8fc9d..42489eb 100644 26*4882a593Smuzhiyun--- a/src/mp4track.cpp 27*4882a593Smuzhiyun+++ b/src/mp4track.cpp 28*4882a593Smuzhiyun@@ -908,16 +908,16 @@ File* MP4Track::GetSampleFile( MP4SampleId sampleId ) 29*4882a593Smuzhiyun MP4FtypAtom *pFtypAtom = reinterpret_cast<MP4FtypAtom *>( m_File.FindAtom( "ftyp" ) ); 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun // MOV spec does not require "ftyp" atom... 32*4882a593Smuzhiyun- if ( pFtypAtom == nullptr ) 33*4882a593Smuzhiyun+ if ( pFtypAtom == NULL ) 34*4882a593Smuzhiyun { 35*4882a593Smuzhiyun- return nullptr; 36*4882a593Smuzhiyun+ return NULL; 37*4882a593Smuzhiyun } 38*4882a593Smuzhiyun else 39*4882a593Smuzhiyun { 40*4882a593Smuzhiyun // ... but most often it is present with a "qt " value 41*4882a593Smuzhiyun const char *majorBrand = pFtypAtom->majorBrand.GetValue(); 42*4882a593Smuzhiyun if ( ::strcmp( pFtypAtom->majorBrand.GetValue(), "qt " ) == 0 ) 43*4882a593Smuzhiyun- return nullptr; 44*4882a593Smuzhiyun+ return NULL; 45*4882a593Smuzhiyun } 46*4882a593Smuzhiyun throw new Exception( "invalid stsd entry", __FILE__, __LINE__, __FUNCTION__ ); 47*4882a593Smuzhiyun } 48*4882a593Smuzhiyun-- 49*4882a593Smuzhiyun2.26.2 50*4882a593Smuzhiyun 51