# HG changeset patch # User reimar # Date 1208937054 0 # Node ID 47864c18ff54c314f80cd0846a7fcc8342e114ae # Parent 67930b46705de365ea41870a8cc2180279c42811 Take audio delay into account when seeking in avisynth demuxer. diff -r 67930b46705d -r 47864c18ff54 libmpdemux/demux_avs.c --- a/libmpdemux/demux_avs.c Wed Apr 23 07:49:51 2008 +0000 +++ b/libmpdemux/demux_avs.c Wed Apr 23 07:50:54 2008 +0000 @@ -430,6 +430,8 @@ 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);