X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fquicktime.c;h=185d631ba74d2a56487967658d9fa5b95299cfc6;hb=7369bb2a8ed6ac52352fa1912c8ef65dc3164703;hp=33ab11da2fad362387f9ce5eab6ec02591c4f441;hpb=6cad86e56c2d61a6c9443e4608eeb6571b3c6322;p=vlc diff --git a/modules/codec/quicktime.c b/modules/codec/quicktime.c index 33ab11da2f..185d631ba7 100644 --- a/modules/codec/quicktime.c +++ b/modules/codec/quicktime.c @@ -2,7 +2,7 @@ * quicktime.c: a quicktime decoder that uses the QT library/dll ***************************************************************************** * Copyright (C) 2003 VideoLAN - * $Id: quicktime.c,v 1.10 2003/08/01 20:06:43 gbazin Exp $ + * $Id: quicktime.c,v 1.14 2003/10/01 20:57:34 hartman Exp $ * * Authors: Laurent Aimar * Derk-Jan Hartman @@ -231,18 +231,6 @@ static int pi_channels_maps[6] = }; -static uint16_t GetWBE( uint8_t *p_buff ) -{ - return( (p_buff[0]<<8) + p_buff[1] ); -} - -static uint32_t GetDWBE( uint8_t *p_buff ) -{ - return( (p_buff[0] << 24) + ( p_buff[1] <<16 ) + - ( p_buff[2] <<8 ) + p_buff[3] ); -} - - static int GetPESData( uint8_t *p_buf, int i_max, pes_packet_t *p_pes ) { int i_copy; @@ -285,9 +273,9 @@ static int GetPESData( uint8_t *p_buf, int i_max, pes_packet_t *p_pes ) *****************************************************************************/ static int OpenDecoder( vlc_object_t *p_this ) { - decoder_fifo_t *p_fifo = (decoder_fifo_t*) p_this; + decoder_t *p_dec = (decoder_t*)p_this; - switch( p_fifo->i_fourcc ) + switch( p_dec->p_fifo->i_fourcc ) { case VLC_FOURCC('S','V','Q','3'): /* Sorenson v3 */ /* case VLC_FOURCC('S','V','Q','1'): Sorenson v1 @@ -297,9 +285,10 @@ static int OpenDecoder( vlc_object_t *p_this ) case VLC_FOURCC('r','l','e',' '): /* QuickTime animation (RLE) */ case VLC_FOURCC('r','p','z','a'): /* QuickTime Apple Video */ case VLC_FOURCC('a','z','p','r'): /* QuickTime animation (RLE) */ - p_fifo->pf_run = RunDecoderVideo; + p_dec->pf_run = RunDecoderVideo; return VLC_SUCCESS; + case VLC_FOURCC('s','a','m','r'): /* 3GPP AMR audio */ case VLC_FOURCC('m','p','4','a'): /* MPEG-4 audio */ case VLC_FOURCC('Q','D','M','C'): /* QDesign */ case VLC_FOURCC('Q','D','M','2'): /* QDesign* 2 */ @@ -321,7 +310,7 @@ static int OpenDecoder( vlc_object_t *p_this ) case 0x6D730002: /* Microsoft ADPCM-ACM */ case 0x6D730011: /* DVI Intel IMAADPCM-ACM */ - p_fifo->pf_run = RunDecoderAudio; + p_dec->pf_run = RunDecoderAudio; return VLC_SUCCESS; default: return VLC_EGENERIC; @@ -503,10 +492,10 @@ static int InitThreadAudio( adec_thread_t *p_dec ) #endif p_dec->output_format.i_format = AOUT_FMT_S16_NE; - p_dec->output_format.i_rate = p_wf->nSamplesPerSec; + p_dec->output_format.i_rate = p_dec->OutputFormatInfo.sampleRate; p_dec->output_format.i_physical_channels = p_dec->output_format.i_original_channels = - pi_channels_maps[p_wf->nChannels]; + pi_channels_maps[p_dec->OutputFormatInfo.numChannels]; aout_DateInit( &p_dec->date, p_dec->output_format.i_rate ); p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo, &p_dec->p_aout,