]> git.sesse.net Git - vlc/commitdiff
* modules/codec/ffmpeg/encoder.c, modules/codec/speex.c: fixed stupid bug in audio...
authorGildas Bazin <gbazin@videolan.org>
Thu, 4 Dec 2003 23:15:01 +0000 (23:15 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 4 Dec 2003 23:15:01 +0000 (23:15 +0000)
modules/codec/ffmpeg/encoder.c
modules/codec/speex.c

index de953cd55be52dfff52c0aa204f9582cd06ffedc..e290803f8c909289e212774a2c671b4bb691e210 100644 (file)
@@ -2,7 +2,7 @@
  * encoder.c: video and audio encoder using the ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: encoder.c,v 1.17 2003/11/29 18:36:13 massiot Exp $
+ * $Id: encoder.c,v 1.18 2003/12/04 23:15:01 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -465,8 +465,8 @@ static block_t *EncodeAudio( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
     /* Backup the remaining raw samples */
     if( i_samples )
     {
-        memcpy( p_sys->p_buffer, p_buffer + i_samples_delay * 2 *
-                p_sys->p_context->channels,
+        memcpy( p_sys->p_buffer + i_samples_delay * 2 *
+                p_sys->p_context->channels, p_buffer,
                 i_samples * 2 * p_sys->p_context->channels );
     }
 
index 2389feb7ee636c3c457e40ff73c9c38438851cf6..0e0f6e4bd978687f6e35eb9f3765feeee20585e4 100755 (executable)
@@ -2,7 +2,7 @@
  * speex.c: speex decoder/packetizer/encoder module making use of libspeex.
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: speex.c,v 1.6 2003/12/04 16:49:43 sam Exp $
+ * $Id: speex.c,v 1.7 2003/12/04 23:15:01 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -730,8 +730,8 @@ static block_t *Encode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
     /* Backup the remaining raw samples */
     if( i_samples )
     {
-        memcpy( p_sys->p_buffer, p_buffer + i_samples_delay * 2 *
-                p_enc->fmt_in.audio.i_channels,
+        memcpy( p_sys->p_buffer + i_samples_delay * 2 *
+                p_enc->fmt_in.audio.i_channels, p_buffer,
                 i_samples * 2 * p_enc->fmt_in.audio.i_channels );
     }