diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:20:45 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-29 21:20:45 +0000 |
commit | b618a7c596e413c91828b36e82bdea55b28bd3e4 (patch) | |
tree | 077eff66a458ad1ee4d3fdef7e2e0870e0e858e6 /libmpdemux/demux_avi.c | |
parent | 1cb75ce96756400df3fb43535376880151e1c172 (diff) | |
download | mpv-b618a7c596e413c91828b36e82bdea55b28bd3e4.tar.bz2 mpv-b618a7c596e413c91828b36e82bdea55b28bd3e4.tar.xz |
fixed these:
- uses video time length instead of audio time length to calculate audio size in fallback
- differences in fallback for priv->numberofframes calculation
patch by eviv bulgroz <ebulgroz@yahoo.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8647 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_avi.c')
-rw-r--r-- | libmpdemux/demux_avi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index bdd384f40c..4e30d5e5a0 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -579,7 +579,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){ if((priv->numberofframes=sh_video->video.dwLength)<=1) // bad video header, try to get number of frames from audio - if(sh_audio && sh_audio->wf->nAvgBytesPerSec) priv->numberofframes=sh_video->fps*sh_audio->audio.dwLength/sh_audio->wf->nAvgBytesPerSec; + if(sh_audio && sh_audio->wf->nAvgBytesPerSec) priv->numberofframes=sh_video->fps*sh_audio->audio.dwLength/sh_audio->audio.dwRate*sh_audio->audio.dwScale; if(priv->numberofframes<=1){ mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo); priv->numberofframes=0; @@ -587,7 +587,7 @@ demuxer_t* demux_open_avi(demuxer_t* demuxer){ if(sh_audio){ if(sh_audio->wf->nAvgBytesPerSec && sh_audio->audio.dwSampleSize!=1){ - asize=sh_audio->wf->nAvgBytesPerSec*priv->numberofframes*sh_video->frametime; + asize=(float)sh_audio->wf->nAvgBytesPerSec*sh_audio->audio.dwLength*sh_audio->audio.dwScale/sh_audio->audio.dwRate; sh_audio->i_bps=sh_audio->wf->nAvgBytesPerSec; } else { asize=sh_audio->audio.dwLength; |