[vlc-commits] opus: always sync i_buffer with i_nb_samples (fixes #10135)
Tristan Matthews
git at videolan.org
Sat Feb 8 17:06:43 CET 2014
vlc/vlc-2.0 | branch: master | Tristan Matthews <le.businessman at gmail.com> | Thu Jan 9 01:28:47 2014 -0500| [afdd8415366e4e55b063fadef8b7d5b6f658f09e] | committer: Felix Paul Kühne
opus: always sync i_buffer with i_nb_samples (fixes #10135)
Specifically, the crash at the end of playback was happening when end trim was
not being subtracted from i_buffer.
(cherry picked from commit f88f91467700484a65d6c5abf0a71cfc4a209320)
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=afdd8415366e4e55b063fadef8b7d5b6f658f09e
---
modules/codec/opus.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index d9d3257..51fa27c 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -395,6 +395,10 @@ static block_t *DecodePacket( decoder_t *p_dec, ogg_packet *p_oggpacket,
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 )
{
memmove(p_aout_buffer->p_buffer,
More information about the vlc-commits
mailing list