Commit 3e81ceae authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Decode correctly some ac3 in wav files.

Don't ignore DTS in wav.
(cherry picked from commit 483cdd60)
(cherry picked from commit dbb13499)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4402375e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment