[MPlayer-cvslog] r32623 - trunk/libmpdemux/demux_avi.c
reimar
subversion at mplayerhq.hu
Sat Nov 13 11:23:34 CET 2010
Author: reimar
Date: Sat Nov 13 11:23:34 2010
New Revision: 32623
Log:
If audio_block_size is 0 that is a bug (and will result in a division by 0
in one case that does not check this), thus remove all checks for it.
Modified:
trunk/libmpdemux/demux_avi.c
Modified: trunk/libmpdemux/demux_avi.c
==============================================================================
--- trunk/libmpdemux/demux_avi.c Sat Nov 13 11:17:13 2010 (r32622)
+++ trunk/libmpdemux/demux_avi.c Sat Nov 13 11:23:34 2010 (r32623)
@@ -159,8 +159,8 @@ static int demux_avi_read_packet(demuxer
pts=priv->avi_audio_pts; //+priv->pts_correction;
priv->avi_audio_pts=0;
// update blockcount:
- priv->audio_block_no+=priv->audio_block_size ?
- ((len+priv->audio_block_size-1)/priv->audio_block_size) : 1;
+ priv->audio_block_no+=
+ (len+priv->audio_block_size-1)/priv->audio_block_size;
} else
if(ds==demux->video){
// video
@@ -687,8 +687,8 @@ static void demux_seek_avi(demuxer_t *de
break;
}
++d_audio->pack_no;
- priv->audio_block_no+=priv->audio_block_size ?
- ((len+priv->audio_block_size-1)/priv->audio_block_size) : 1;
+ priv->audio_block_no+=
+ (len+priv->audio_block_size-1)/priv->audio_block_size;
d_audio->dpos+=len;
}
}
@@ -713,12 +713,11 @@ static void demux_seek_avi(demuxer_t *de
skip_audio_bytes+=len;
} else {
++d_audio->pack_no;
- priv->audio_block_no+=priv->audio_block_size ?
- ((len+priv->audio_block_size-1)/priv->audio_block_size) : 1;
+ priv->audio_block_no+=
+ (len+priv->audio_block_size-1)/priv->audio_block_size;
d_audio->dpos+=len;
audio_chunk_pos=i;
}
- if(priv->audio_block_size)
chunks-=(len+priv->audio_block_size-1)/priv->audio_block_size;
}
}
More information about the MPlayer-cvslog
mailing list