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

git version control git at videolan.org
Thu Jun 25 15:15:33 CEST 2009


vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 25 14:56:44 2009 +0200| [3e81ceae211becfc32f114c0cfb9308155adbc6d] | committer: Jean-Baptiste Kempf 

Decode correctly some ac3 in wav files.
Don't ignore DTS in wav.
(cherry picked from commit 483cdd603898ec9bf23eacbf895aa44f0d34b5c4)
(cherry picked from commit dbb1349919ae066bce67a3ae61637431b578b919)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/demux/mpeg/es.c b/modules/demux/mpeg/es.c
index 357537f..9dc80eb 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"
@@ -617,8 +618,10 @@ 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 &&
+        i_format != WAVE_FORMAT_A52 &&
+        i_format != WAVE_FORMAT_DTS )
         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