[vlc-devel] [PATCH 30/30] mkv: fixed format-specifier related to mkv_track_t::i_number

Filip Roséen filip at videolabs.io
Mon May 9 14:53:24 CEST 2016


i_number is an unsigned int, meaning that the format-specifier should be
"%u" and not "%d"; this patch fixes that.
---
 modules/demux/mkv/matroska_segment_parse.cpp | 4 ++--
 modules/demux/mkv/util.cpp                   | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 2571670..413bd16 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -649,7 +649,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
 #endif
         if( TrackInit( &track ) )
         {
-            msg_Err(&sys.demuxer, "Couldn't init track %d", track.i_number );
+            msg_Err(&sys.demuxer, "Couldn't init track %u", track.i_number );
             free(track.p_extra_data);
             return;
         }
@@ -658,7 +658,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
     }
     else
     {
-        msg_Err( &sys.demuxer, "Track Entry %d not supported", track.i_number );
+        msg_Err( &sys.demuxer, "Track Entry %u not supported", track.i_number );
         free(track.p_extra_data);
     }
 }
diff --git a/modules/demux/mkv/util.cpp b/modules/demux/mkv/util.cpp
index 11736d9..1740db6 100644
--- a/modules/demux/mkv/util.cpp
+++ b/modules/demux/mkv/util.cpp
@@ -44,7 +44,7 @@ int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk )
     d_stream.opaque = Z_NULL;
     if( inflateInit( &d_stream ) != Z_OK )
     {
-        msg_Err( p_demux, "Couldn't initiate inflation ignore track %d",
+        msg_Err( p_demux, "Couldn't initiate inflation ignore track %u",
                  tk->i_number );
         free(tk->p_extra_data);
         delete tk;
@@ -59,7 +59,7 @@ int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk )
         void *alloc = realloc(p_new_extra, n*1024);
         if( alloc == NULL )
         {
-            msg_Err( p_demux, "Couldn't allocate buffer to inflate data, ignore track %d",
+            msg_Err( p_demux, "Couldn't allocate buffer to inflate data, ignore track %u",
                       tk->i_number );
             free(p_new_extra);
             inflateEnd( &d_stream );
@@ -90,7 +90,7 @@ int32_t zlib_decompress_extra( demux_t * p_demux, mkv_track_t * tk )
     p_new_extra = static_cast<uint8_t *>( realloc(p_new_extra, tk->i_extra_data) );
     if( !p_new_extra )
     {
-        msg_Err( p_demux, "Couldn't allocate buffer to inflate data, ignore track %d",
+        msg_Err( p_demux, "Couldn't allocate buffer to inflate data, ignore track %u",
                  tk->i_number );
         inflateEnd( &d_stream );
         free(p_new_extra);
@@ -188,7 +188,7 @@ void handle_real_audio(demux_t * p_demux, mkv_track_t * p_tk, block_t * p_blk, m
 
         if ( !( p_blk->i_flags & BLOCK_FLAG_TYPE_I) )
         {
-            msg_Dbg( p_demux, "discard non-key preroll block in track %d at%" PRId64,
+            msg_Dbg( p_demux, "discard non-key preroll block in track %u at %" PRId64,
                      p_tk->i_number, i_pts );
             return;
         }
-- 
2.8.2



More information about the vlc-devel mailing list