mirror of https://github.com/mpv-player/mpv
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:
parent
42d99bda52
commit
0d39e76b1e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue