demuxer might not set i_bps, so do not divide by it in that case

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19188 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-07-26 18:52:33 +00:00
parent 42d99bda52
commit 0d39e76b1e
1 changed files with 1 additions and 0 deletions

View File

@ -2492,6 +2492,7 @@ static double written_audio_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio)
// ds_tell_pts returns gets bytes read after last timestamp from
// demuxing layer, decoder might use sh_audio->a_in_buffer for bytes
// it has read but not decoded
if (sh_audio->i_bps)
a_pts += (ds_tell_pts(d_audio) - sh_audio->a_in_buffer_len) /
(double)sh_audio->i_bps;
}