From: Juho Vähä-Herttua Date: Fri, 16 Jul 2010 11:50:51 +0000 (+0300) Subject: asf: Fix packet length handling to be correct X-Git-Tag: 1.2.0-pre1~5801 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ebf5468e5beaa6489b69e7ec6cc2220d315a029b;p=vlc asf: Fix packet length handling to be correct Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c index e408296e25..9294d2209f 100644 --- a/modules/demux/asf/asf.c +++ b/modules/demux/asf/asf.c @@ -466,11 +466,17 @@ static int DemuxPacket( demux_t *p_demux ) goto loop_error_recovery; } + if( i_packet_length < i_data_packet_min ) + { + /* if packet length too short, there is extra padding */ + i_packet_padding_length += i_data_packet_min - i_packet_length; + i_packet_length = i_data_packet_min; + } + i_packet_send_time = GetDWLE( p_peek + i_skip ); i_skip += 4; i_packet_duration = GetWLE( p_peek + i_skip ); i_skip += 2; - /* FIXME I have to do that for some file, I don't known why */ - i_packet_size_left = i_data_packet_min /*i_packet_length*/ ; + i_packet_size_left = i_packet_length; if( b_packet_multiple_payload ) {