Commit d30ca89d authored by Laurent Aimar's avatar Laurent Aimar

Backport [20551] (stereo + odd chunk size)

parent 26530642
......@@ -173,6 +173,8 @@ static int Open( vlc_object_t *p_this )
/* Skip this chunk */
i_size += 8;
if( (i_size % 2) != 0 )
i_size++;
if( stream_Read( p_demux->s, NULL, i_size ) != (int)i_size )
{
msg_Warn( p_demux, "incomplete file" );
......@@ -184,7 +186,7 @@ static int Open( vlc_object_t *p_this )
p_sys->i_ssnd_end = p_sys->i_ssnd_start + p_sys->i_ssnd_size;
p_sys->i_ssnd_fsize = p_sys->fmt.audio.i_channels *
( p_sys->fmt.audio.i_bitspersample + 7 ) / 8;
((p_sys->fmt.audio.i_bitspersample + 7) / 8);
if( p_sys->i_ssnd_fsize <= 0 )
{
......
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