]> git.sesse.net Git - vlc/commitdiff
petit patch pour faire marcher l'AC3
authorSam Hocevar <sam@videolan.org>
Tue, 18 Jan 2000 16:17:26 +0000 (16:17 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 18 Jan 2000 16:17:26 +0000 (16:17 +0000)
src/input/input.c

index c12d14f05df085f0cad5012efbbd8159ec550c16..bd78838a206781292f01241148e5b2d67a59b6ae 100644 (file)
@@ -914,7 +914,8 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input,
                 /* The PES header contains at least 3 more bytes: parse them */
                 p_pes->b_data_alignment = p_pes->p_pes_header[6] & 0x04;
                 p_pes->b_has_pts = p_pes->p_pes_header[7] & 0x80;
-                i_pes_header_size = 9 + p_pes->p_pes_header[8];
+                i_pes_header_size = p_pes->p_pes_header[8]
+                        + (p_es_descriptor->i_type == AC3_AUDIO_ES) ? 13 : 9;
 
                 /* Now parse the optional header extensions (in the limit of
                    the 14 bytes */
@@ -979,6 +980,7 @@ static __inline__ void input_DemuxPES( input_thread_t *p_input,
             /* This last packet is partly header, partly payload. */
             p_ts->i_payload_start += i_pes_header_size;
 
+           
             /* Now we can eventually put the PES packet in the decoder's
                PES fifo */
             switch( p_es_descriptor->i_type )