uint8_t *p_peek;
- if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC;
+ if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 )
+ return VLC_EGENERIC;
if( strncmp( (char *)&p_peek[0], "FORM", 4 ) || strncmp( (char *)&p_peek[8], "AIFF", 4 ) )
- {
return VLC_EGENERIC;
- }
/* skip aiff header */
stream_Read( p_demux->s, NULL, 12 );
/* 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" );
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 )
{