X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fdemux%2Fwav.c;h=915cd3e72e0da1cf805463b2c7bb4980b02e1de1;hb=b5c956997c8370a10ad89aff05ac6ec86117367e;hp=5db087f16ec7f9a47e2bd7c420724dcd241c3dc3;hpb=91f2877dec9e00d081facbb7b12f610a9f329357;p=vlc diff --git a/modules/demux/wav.c b/modules/demux/wav.c index 5db087f16e..915cd3e72e 100644 --- a/modules/demux/wav.c +++ b/modules/demux/wav.c @@ -1,7 +1,7 @@ /***************************************************************************** * wav.c : wav file input module for vlc ***************************************************************************** - * Copyright (C) 2001-2003 VideoLAN + * Copyright (C) 2001-2003 the VideoLAN team * $Id$ * * Authors: Laurent Aimar @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** @@ -112,7 +112,7 @@ static int Open( vlc_object_t * p_this ) /* Is it a wav file ? */ if( stream_Peek( p_demux->s, &p_peek, 12 ) < 12 ) return VLC_EGENERIC; - if( strncmp( p_peek, "RIFF", 4 ) || strncmp( &p_peek[8], "WAVE", 4 ) ) + if( memcmp( p_peek, "RIFF", 4 ) || memcmp( &p_peek[8], "WAVE", 4 ) ) { return VLC_EGENERIC; } @@ -168,7 +168,7 @@ static int Open( vlc_object_t * p_this ) if( GetWLE( &p_wf->wFormatTag ) == WAVE_FORMAT_EXTENSIBLE && i_size >= sizeof( WAVEFORMATEXTENSIBLE ) ) { - int i, i_channel_mask; + unsigned i, i_channel_mask; GUID guid_subformat; guid_subformat = p_wf_ext->SubFormat; @@ -191,6 +191,7 @@ static int Open( vlc_object_t * p_this ) } if( p_sys->fmt.i_codec == VLC_FOURCC('a','r','a','w') || + p_sys->fmt.i_codec == VLC_FOURCC('p','c','m',' ') || p_sys->fmt.i_codec == VLC_FOURCC('a','f','l','t') ) p_sys->b_chan_reorder = @@ -230,6 +231,8 @@ static int Open( vlc_object_t * p_this ) case VLC_FOURCC( 'a', 'f', 'l', 't' ): case VLC_FOURCC( 'u', 'l', 'a', 'w' ): case VLC_FOURCC( 'a', 'l', 'a', 'w' ): + case VLC_FOURCC( 'm', 'l', 'a', 'w' ): + case VLC_FOURCC( 'p', 'c', 'm', ' ' ): FrameInfo_PCM( p_demux, &p_sys->i_frame_size, &p_sys->i_frame_samples ); break; @@ -379,9 +382,9 @@ static int ChunkFind( demux_t *p_demux, char *fcc, unsigned int *pi_size ) i_size = GetDWLE( p_peek + 4 ); - msg_Dbg( p_demux, "Chunk: fcc=`%4.4s` size=%d", p_peek, i_size ); + msg_Dbg( p_demux, "chunk: fcc=`%4.4s` size=%d", p_peek, i_size ); - if( !strncmp( p_peek, fcc, 4 ) ) + if( !memcmp( p_peek, fcc, 4 ) ) { if( pi_size ) {