[vlc-devel] [PATCH 1/2] opus: update i_buffer when memmoving decoder output
Tristan Matthews
le.businessman at gmail.com
Tue Nov 12 16:01:39 CET 2013
Fixes #9343
---
modules/codec/opus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 60edb5f..d4e5f88 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -404,10 +404,12 @@ static block_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
}
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),
- (i_nb_samples - i_end_trim)*p_sys->header.channels*sizeof(float));
+ p_aout_buffer->i_buffer);
}
i_nb_samples -= i_end_trim;
--
1.8.1.2
More information about the vlc-devel
mailing list