[vlc-devel] [PATCH 8/8] mkv: pass a const mkv_track_t to packetize_wavpack()
Steve Lhomme
robux4 at videolabs.io
Mon Jul 31 15:03:00 CEST 2017
---
modules/demux/mkv/mkv.cpp | 2 +-
modules/demux/mkv/util.cpp | 6 +++---
modules/demux/mkv/util.hpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index c4909d5c0b..6cdef125d8 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -569,7 +569,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
track.i_encoding_scope & MATROSKA_ENCODING_SCOPE_ALL_FRAMES )
p_block = MemToBlock( data->Buffer(), data->Size(), track.p_compression_data->GetSize() );
else if( unlikely( track.fmt.i_codec == VLC_CODEC_WAVPACK ) )
- p_block = packetize_wavpack( &track, data->Buffer(), data->Size() );
+ p_block = packetize_wavpack( track, data->Buffer(), data->Size() );
else
p_block = MemToBlock( data->Buffer(), data->Size(), 0 );
diff --git a/modules/demux/mkv/util.cpp b/modules/demux/mkv/util.cpp
index bef5cca6c2..b5ea09a79d 100644
--- a/modules/demux/mkv/util.cpp
+++ b/modules/demux/mkv/util.cpp
@@ -312,7 +312,7 @@ static inline void fill_wvpk_block(uint16_t version, uint32_t block_samples, uin
memcpy( dst + 32, src, srclen );
}
-block_t * packetize_wavpack( mkv_track_t * p_tk, uint8_t * buffer, size_t size)
+block_t * packetize_wavpack( const mkv_track_t & tk, uint8_t * buffer, size_t size)
{
uint16_t version = 0x403;
uint32_t block_samples;
@@ -320,8 +320,8 @@ block_t * packetize_wavpack( mkv_track_t * p_tk, uint8_t * buffer, size_t size)
uint32_t crc;
block_t * p_block = NULL;
- if( p_tk->i_extra_data >= 2 )
- version = GetWLE( p_tk->p_extra_data );
+ if( tk.i_extra_data >= 2 )
+ version = GetWLE( tk.p_extra_data );
if( size < 12 )
return NULL;
diff --git a/modules/demux/mkv/util.hpp b/modules/demux/mkv/util.hpp
index 7bee3640e1..780acaaf60 100644
--- a/modules/demux/mkv/util.hpp
+++ b/modules/demux/mkv/util.hpp
@@ -89,7 +89,7 @@ public:
size_t i_subpacket;
};
-block_t * packetize_wavpack( mkv_track_t *, uint8_t *, size_t);
+block_t * packetize_wavpack( const mkv_track_t &, uint8_t *, size_t);
/* helper functions to print the mkv parse tree */
void MkvTree_va( demux_t& demuxer, int i_level, const char* fmt, va_list args);
--
2.12.1
More information about the vlc-devel
mailing list