Specifically, the crash at the end of playback was happening when end trim was
not being subtracted from i_buffer.
msg_Err( p_dec, "Error: corrupted stream?" );
return NULL;
}
+
+ p_aout_buffer->i_buffer = (i_nb_samples - i_end_trim) *
+ p_sys->header.channels * sizeof(float);
+
if( spp > i_nb_samples )
{
- p_aout_buffer->i_buffer = (i_nb_samples - i_end_trim) *
- p_sys->header.channels * sizeof(float);
memmove(p_aout_buffer->p_buffer,
p_aout_buffer->p_buffer
+ (spp - i_nb_samples)*p_sys->header.channels*sizeof(float),