1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-20 05:42:19 +00:00

Take audio delay into account when seeking in avisynth demuxer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26505 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-04-23 07:50:54 +00:00
parent 4fd37efa40
commit ea35e0563d

View File

@ -430,6 +430,8 @@ static void demux_seek_avs(demuxer_t *demuxer, float rel_seek_secs, float audio_
sh_video->num_frames_decoded = AVS->frameno;
sh_video->num_frames = AVS->frameno;
}
video_pos += audio_delay;
if (video_pos < 0) video_pos = 0;
if (sh_audio)
AVS->sampleno = FFMIN(video_pos * sh_audio->samplerate,
AVS->video_info->num_audio_samples);