[vlc-commits] avcodec: deinterleave correct amount of samples
Ilkka Ollakka
git at videolan.org
Sun Apr 7 19:14:17 CEST 2013
vlc/vlc-2.0 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Apr 7 20:12:24 2013 +0300| [5246e638e3decfd91b0f31e7491b2ff198213dfe] | committer: 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
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5246e638e3decfd91b0f31e7491b2ff198213dfe
---
modules/codec/avcodec/encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 43e53ab..1d89008 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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 ) )
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
memcpy( p_sys->p_buffer + i_delay_size * p_sys->i_sample_bytes,
p_buffer, i_size );
More information about the vlc-commits
mailing list