]> git.sesse.net Git - vlc/commitdiff
ALL : In order to make ac3 working in avi file, I've deplaced some code
authorLaurent Aimar <fenrir@videolan.org>
Mon, 27 May 2002 16:01:42 +0000 (16:01 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 27 May 2002 16:01:42 +0000 (16:01 +0000)
from ac3 decoder to mpeg_system.c. ( skip 3 bytes is now done in
mpeg_system.c and no longer in ac3 audio decoder ).

plugins/a52/a52.c
plugins/ac3_adec/ac3_adec.c
plugins/ac3_spdif/ac3_spdif.c
src/input/mpeg_system.c

index cde0a85d672054acfc9043c59ad8d833d782d68f..d4aae752630280c40094a076baace7fcd3bfa6f0 100644 (file)
@@ -4,7 +4,7 @@
  *   (http://liba52.sf.net/).
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: a52.c,v 1.12 2002/05/24 12:42:14 gbazin Exp $
+ * $Id: a52.c,v 1.13 2002/05/27 16:01:42 fenrir Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -367,6 +367,6 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
     if( b_new_pes )
     {
         /* Drop special AC3 header */
-        p_bit_stream->p_byte += 3;
+/*        p_bit_stream->p_byte += 3; */
     }
 }
index cb3c63425dcfaa967431578097efd6fbb47eeb3a..146ee7f99f18c4c1a6c44f358f0d0bef10a10439 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_adec.c: ac3 decoder module main file
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_adec.c,v 1.30 2002/05/15 19:36:04 sam Exp $
+ * $Id: ac3_adec.c,v 1.31 2002/05/27 16:01:42 fenrir Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *
@@ -428,7 +428,7 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
     if( b_new_pes )
     {
         /* Drop special AC3 header */
-        p_bit_stream->p_byte += 3;
+/*        p_bit_stream->p_byte += 3; */
     }
 }
 
index a68848ba49a9930f00be97731a8a1f3cf9995a36..0cc4e46a17004e8f5155c41a8b646b71f0ec3d1b 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ac3_spdif.c,v 1.25 2002/05/24 12:42:14 gbazin Exp $
+ * $Id: ac3_spdif.c,v 1.26 2002/05/27 16:01:42 fenrir Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
@@ -385,7 +385,7 @@ static void BitstreamCallback( bit_stream_t * p_bit_stream,
     {
         p_spdif = (ac3_spdif_thread_t *)p_bit_stream->p_callback_arg;
 
-        p_bit_stream->p_byte += 3;
+/*        p_bit_stream->p_byte += 3; */
 
         p_spdif->i_pts =
             p_bit_stream->p_decoder_fifo->p_first->i_pts;
index 899befa69ac9da53393a2bc670dff31262ce49c6..96bc9406f921d860080be62fcebcf706dec775f9 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.96 2002/05/18 17:47:47 sam Exp $
+ * $Id: mpeg_system.c,v 1.97 2002/05/27 16:01:42 fenrir Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -340,6 +340,12 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
             i_pes_header_size++;
         }
 
+        if( p_es->i_type == AC3_AUDIO_ES )
+        {
+            /* With ac3 audio, we need to skip first 3 bytes */
+            i_pes_header_size += 3;
+        }
+
         /* Now we've parsed the header, we just have to indicate in some
          * specific data packets where the PES payload begins (renumber
          * p_payload_start), so that the decoders can find the beginning
@@ -373,6 +379,7 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
         }
         p_data->p_payload_start += i_pes_header_size;
 
+
         /* Now we can eventually put the PES packet in the decoder's
          * PES fifo */
         if( p_es->p_decoder_fifo != NULL )