[vlc-devel] commit: Decode correctly some ac3 in wav files. (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Jun 25 14:57:31 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 25 14:56:44 2009 +0200| [483cdd603898ec9bf23eacbf895aa44f0d34b5c4] | committer: Jean-Baptiste Kempf 

Decode correctly some ac3 in wav files.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=483cdd603898ec9bf23eacbf895aa44f0d34b5c4
---

 modules/demux/mpeg/es.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 2f0e061..4792781 100644
--- a/modules/demux/mpeg/es.c
+++ b/modules/demux/mpeg/es.c
@@ -34,6 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
 #include <vlc_codec.h>
+#include <vlc_codecs.h>
 #include <vlc_input.h>
 
 #include "../../codec/a52.h"
@@ -616,8 +617,9 @@ static int WavSkipHeader( demux_t *p_demux, int *pi_skip )
     i_peek += i_len + 8;
     if( stream_Peek( p_demux->s, &p_peek, i_peek ) != i_peek )
         return VLC_EGENERIC;
-    if( GetWLE( p_peek + i_peek - i_len - 8 /* wFormatTag */ ) !=
-        1 /* WAVE_FORMAT_PCM */ )
+    int i_format = GetWLE( p_peek + i_peek - i_len - 8 /* wFormatTag */ );
+    if( i_format != WAVE_FORMAT_PCM && /* WAVE_FORMAT_PCM */
+        i_format != WAVE_FORMAT_A52 /* WAVE_FORMAT_A52 */ )
         return VLC_EGENERIC;
     if( GetWLE( p_peek + i_peek - i_len - 6 /* nChannels */ ) != 2 )
         return VLC_EGENERIC;




More information about the vlc-devel mailing list