From: Laurent Aimar Date: Mon, 28 Oct 2002 11:49:57 +0000 (+0000) Subject: * fix a bug while passing informations to audio decoder(wma in X-Git-Tag: 0.5.0~808 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3f3c092f45240447e1cda25dc71c62a2ac13e85b;p=vlc * fix a bug while passing informations to audio decoder(wma in asf should work). --- diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index beacb73a66..7f6c53552c 100644 --- a/modules/demux/asf/asf.c +++ b/modules/demux/asf/asf.c @@ -2,7 +2,7 @@ * asf.c : ASFv01 file input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: asf.c,v 1.2 2002/10/21 09:18:37 fenrir Exp $ + * $Id: asf.c,v 1.3 2002/10/28 11:49:57 fenrir Exp $ * Authors: Laurent Aimar * * This program is free software; you can redistribute it and/or modify @@ -189,13 +189,7 @@ static int Activate( vlc_object_t * p_this ) input_AddES( p_input, p_input->stream.p_selected_program, p_sp->i_stream_number, - p_sp->i_type_specific_data_length ); - if( p_sp->i_type_specific_data_length > 11 ) - { - memcpy( p_stream->p_es->p_demux_data, - p_sp->p_type_specific_data + 11, - p_sp->i_type_specific_data_length - 11 ); - } + 0 ); vlc_mutex_unlock( &p_input->stream.stream_lock ); if( CmpGUID( &p_sp->i_stream_type, &asf_object_stream_type_audio ) ) @@ -231,14 +225,25 @@ static int Activate( vlc_object_t * p_this ) VLC_FOURCC( 'a','5','2',' ' ); break; case( 0x160 ): + p_stream->p_es->i_fourcc = + VLC_FOURCC( 'w','m','a','1' ); + break; case( 0x161 ): p_stream->p_es->i_fourcc = - VLC_FOURCC( 'w','m','a',' ' ); + VLC_FOURCC( 'w','m','a','2' ); break; default: p_stream->p_es->i_fourcc = VLC_FOURCC( 'u','n','d','f' ); } + if( p_sp->i_type_specific_data_length > 0 ) + { + p_stream->p_es->p_demux_data = + malloc( p_sp->i_type_specific_data_length ); + memcpy( p_stream->p_es->p_demux_data, + p_sp->p_type_specific_data, + p_sp->i_type_specific_data_length ); + } } else @@ -258,6 +263,14 @@ static int Activate( vlc_object_t * p_this ) p_stream->p_es->i_fourcc = VLC_FOURCC( 'u','n','d','f' ); } + if( p_sp->i_type_specific_data_length > 11 ) + { + p_stream->p_es->p_demux_data = + malloc( p_sp->i_type_specific_data_length - 11); + memcpy( p_stream->p_es->p_demux_data, + p_sp->p_type_specific_data + 11, + p_sp->i_type_specific_data_length - 11 ); + } } else