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
1 changed files with 2 additions and 0 deletions

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);