Commit cd70eeac authored by Laurent Aimar's avatar Laurent Aimar

* asf: fix my previous commit.

parent 8dc9156f
......@@ -2,7 +2,7 @@
* asf.c : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.c,v 1.9 2002/11/28 16:32:29 fenrir Exp $
* $Id: asf.c,v 1.10 2002/11/28 18:35:19 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -255,7 +255,8 @@ static int Activate( vlc_object_t * p_this )
p_wf->nAvgBytesPerSec = GetDWLE( p_data + 8 );
p_wf->nBlockAlign = GetWLE( p_data + 12 );
p_wf->wBitsPerSample = GetWLE( p_data + 14 );
p_wf->cbSize = i_size - sizeof( WAVEFORMATEX );
p_wf->cbSize = __MAX( 0,
i_size - sizeof( WAVEFORMATEX ));
if( i_size > sizeof( WAVEFORMATEX ) )
{
memcpy( (uint8_t*)p_stream->p_es->p_demux_data + sizeof( WAVEFORMATEX ),
......@@ -275,10 +276,10 @@ static int Activate( vlc_object_t * p_this )
if( p_sp->p_type_specific_data )
{
p_stream->p_es->i_fourcc =
VLC_FOURCC( p_sp->p_type_specific_data + 27,
p_sp->p_type_specific_data + 28,
p_sp->p_type_specific_data + 29,
p_sp->p_type_specific_data + 30 );
VLC_FOURCC( p_sp->p_type_specific_data[27],
p_sp->p_type_specific_data[28],
p_sp->p_type_specific_data[29],
p_sp->p_type_specific_data[30] );
}
else
{
......
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