Commit 5246e638 authored by Ilkka Ollakka's avatar Ilkka Ollakka

avcodec: deinterleave correct amount of samples

For me resampling still outputs wrong output (cracking samples), but I
haven't yet narrowed down why.

Should fix #8265
parent d10711fb
...@@ -1146,7 +1146,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf ) ...@@ -1146,7 +1146,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
if( av_sample_fmt_is_planar( p_sys->p_context->sample_fmt ) ) if( av_sample_fmt_is_planar( p_sys->p_context->sample_fmt ) )
Deinterleave( &p_sys->p_buffer[i_delay_size * p_sys->i_sample_bytes], Deinterleave( &p_sys->p_buffer[i_delay_size * p_sys->i_sample_bytes],
p_buffer, i_samples_delay, p_enc->fmt_in.audio.i_channels, p_enc->fmt_in.i_codec ); p_buffer, p_sys->i_frame_size - i_delay_size, p_enc->fmt_in.audio.i_channels, p_enc->fmt_in.i_codec );
else else
memcpy( p_sys->p_buffer + i_delay_size * p_sys->i_sample_bytes, memcpy( p_sys->p_buffer + i_delay_size * p_sys->i_sample_bytes,
p_buffer, i_size ); p_buffer, i_size );
......
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