diff -Naur mp4v2-2.0.0/libutil/Utility.cpp mp4v2-2.0.0-fixed/libutil/Utility.cpp
--- mp4v2-2.0.0/libutil/Utility.cpp	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/libutil/Utility.cpp	2018-09-22 20:32:50 +0000
@@ -480,7 +480,7 @@
     }
 
     for( ;; ) {
-        const int code = prog::getOption( _argc, _argv, _shortOptions.c_str(), _longOptions, NULL );
+        const unsigned int code = prog::getOption( _argc, _argv, _shortOptions.c_str(), _longOptions, NULL );
         if( code == -1 )
             break;
 
diff -Naur mp4v2-2.0.0/libutil/Utility.h mp4v2-2.0.0-fixed/libutil/Utility.h
--- mp4v2-2.0.0/libutil/Utility.h	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/libutil/Utility.h	2018-09-22 20:40:51 +0000
@@ -141,7 +141,7 @@
     bool dryrunAbort();
 
     // delegates
-    virtual bool utility_option( int, bool& ) = 0; //!< process command-line option
+    virtual bool utility_option( unsigned int, bool& ) = 0; //!< process command-line option
     virtual bool utility_job( JobContext& )   = 0; //!< process positional argument
 
 private:
diff -Naur mp4v2-2.0.0/src/mp4.cpp mp4v2-2.0.0-fixed/src/mp4.cpp
--- mp4v2-2.0.0/src/mp4.cpp	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/src/mp4.cpp	2018-09-22 17:33:43 +0000
@@ -870,7 +870,7 @@
         }
 
         catch (...) {
-            return MP4_INVALID_TRACK_ID;
+            return NULL;
         }
     }
 
diff -Naur mp4v2-2.0.0/src/mp4track.cpp mp4v2-2.0.0-fixed/src/mp4track.cpp
--- mp4v2-2.0.0/src/mp4track.cpp	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/src/mp4track.cpp	2018-09-22 17:29:31 +0000
@@ -1071,7 +1071,7 @@
     }
 
     for (uint32_t sttsIndex = m_cachedSttsIndex; sttsIndex < numStts; sttsIndex++) {
-        uint32_t sampleCount =
+        uint64_t sampleCount =
             m_pSttsSampleCountProperty->GetValue(sttsIndex);
         uint32_t sampleDelta =
             m_pSttsSampleDeltaProperty->GetValue(sttsIndex);
@@ -1109,7 +1109,7 @@
     MP4Duration elapsed = 0;
 
     for (uint32_t sttsIndex = 0; sttsIndex < numStts; sttsIndex++) {
-        uint32_t sampleCount =
+        uint64_t sampleCount =
             m_pSttsSampleCountProperty->GetValue(sttsIndex);
         uint32_t sampleDelta =
             m_pSttsSampleDeltaProperty->GetValue(sttsIndex);
diff -Naur mp4v2-2.0.0/src/mp4util.h mp4v2-2.0.0-fixed/src/mp4util.h
--- mp4v2-2.0.0/src/mp4util.h	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/src/mp4util.h	2018-09-22 17:30:42 +0000
@@ -33,7 +33,7 @@
 #ifndef ASSERT
 #   define ASSERT(expr) \
         if (!(expr)) { \
-            throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
+            throw new Exception("assert failure: " LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
         }
 #endif
 
diff -Naur mp4v2-2.0.0/src/rtphint.cpp mp4v2-2.0.0-fixed/src/rtphint.cpp
--- mp4v2-2.0.0/src/rtphint.cpp	2012-05-20 22:11:53 +0000
+++ mp4v2-2.0.0-fixed/src/rtphint.cpp	2018-09-22 17:36:08 +0000
@@ -339,7 +339,7 @@
                 pSlash = strchr(pSlash, '/');
                 if (pSlash != NULL) {
                     pSlash++;
-                    if (pSlash != '\0') {
+                    if (*pSlash != '\0') {
                         length = (uint32_t)strlen(pRtpMap) - (pSlash - pRtpMap);
                         *ppEncodingParams = (char *)MP4Calloc(length + 1);
                         strncpy(*ppEncodingParams, pSlash, length);
diff -Naur mp4v2-2.0.0/util/mp4art.cpp mp4v2-2.0.0-fixed/util/mp4art.cpp
--- mp4v2-2.0.0/util/mp4art.cpp	2012-05-20 22:11:55 +0000
+++ mp4v2-2.0.0-fixed/util/mp4art.cpp	2018-09-22 20:38:01 +0000
@@ -48,7 +48,7 @@
 
 protected:
     // delegates implementation
-    bool utility_option( int, bool& );
+    bool utility_option( unsigned int, bool& );
     bool utility_job( JobContext& );
 
 private:
@@ -372,7 +372,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 bool
-ArtUtility::utility_option( int code, bool& handled )
+ArtUtility::utility_option( unsigned int code, bool& handled )
 {
     handled = true;
 
diff -Naur mp4v2-2.0.0/util/mp4chaps.cpp mp4v2-2.0.0-fixed/util/mp4chaps.cpp
--- mp4v2-2.0.0/util/mp4chaps.cpp	2012-05-20 22:11:55 +0000
+++ mp4v2-2.0.0-fixed/util/mp4chaps.cpp	2018-09-22 20:38:51 +0000
@@ -74,7 +74,7 @@
 
 protected:
     // delegates implementation
-    bool utility_option( int, bool& );
+    bool utility_option( unsigned int, bool& );
     bool utility_job( JobContext& );
 
 private:
@@ -628,7 +628,7 @@
  *  @see Utility::utility_option( int, bool& )
  */
 bool
-ChapterUtility::utility_option( int code, bool& handled )
+ChapterUtility::utility_option( unsigned int code, bool& handled )
 {
     handled = true;
 
diff -Naur mp4v2-2.0.0/util/mp4file.cpp mp4v2-2.0.0-fixed/util/mp4file.cpp
--- mp4v2-2.0.0/util/mp4file.cpp	2012-05-20 22:11:55 +0000
+++ mp4v2-2.0.0-fixed/util/mp4file.cpp	2018-09-22 20:38:19 +0000
@@ -43,7 +43,7 @@
 
 protected:
     // delegates implementation
-    bool utility_option( int, bool& );
+    bool utility_option( unsigned int, bool& );
     bool utility_job( JobContext& );
 
 private:
@@ -185,7 +185,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 bool
-FileUtility::utility_option( int code, bool& handled )
+FileUtility::utility_option( unsigned int code, bool& handled )
 {
     handled = true;
 
diff -Naur mp4v2-2.0.0/util/mp4subtitle.cpp mp4v2-2.0.0-fixed/util/mp4subtitle.cpp
--- mp4v2-2.0.0/util/mp4subtitle.cpp	2012-05-20 22:11:55 +0000
+++ mp4v2-2.0.0-fixed/util/mp4subtitle.cpp	2018-09-22 20:37:43 +0000
@@ -43,7 +43,7 @@
 
 protected:
     // delegates implementation
-    bool utility_option( int, bool& );
+    bool utility_option( unsigned int, bool& );
     bool utility_job( JobContext& );
 
 private:
@@ -160,7 +160,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 bool
-SubtitleUtility::utility_option( int code, bool& handled )
+SubtitleUtility::utility_option( unsigned int code, bool& handled )
 {
     handled = true;
 
diff -Naur mp4v2-2.0.0/util/mp4track.cpp mp4v2-2.0.0-fixed/util/mp4track.cpp
--- mp4v2-2.0.0/util/mp4track.cpp	2012-05-20 22:11:55 +0000
+++ mp4v2-2.0.0-fixed/util/mp4track.cpp	2018-09-22 20:37:25 +0000
@@ -78,7 +78,7 @@
 
 protected:
     // delegates implementation
-    bool utility_option( int, bool& );
+    bool utility_option( unsigned int, bool& );
     bool utility_job( JobContext& );
 
 private:
@@ -784,7 +784,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 bool
-TrackUtility::utility_option( int code, bool& handled )
+TrackUtility::utility_option( unsigned int code, bool& handled )
 {
     handled = true;
 
