Commit b6d43b0b authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

mkv: pass a const mkv_track_t to packetize_wavpack()

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 35fc77d1
......@@ -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 );
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment