Index: libmpdemux/demux_avi.c =================================================================== --- libmpdemux/demux_avi.c (revision 24350) +++ libmpdemux/demux_avi.c (working copy) @@ -594,6 +594,9 @@ } ++video_chunk_pos; } + if (rel_seek_frames>0) { + demuxer->video->eof = 1; + } } else { // seek backward while(video_chunk_pos>0){ Index: mplayer.c =================================================================== --- mplayer.c (revision 24350) +++ mplayer.c (working copy) @@ -2234,9 +2234,15 @@ static int seek(MPContext *mpctx, double amount, int style) { current_module = "seek"; - if (demux_seek(mpctx->demuxer, amount, audio_delay, style) == 0) + int dmxret = demux_seek(mpctx->demuxer, amount, audio_delay, style); + if (mpctx->demuxer->video->eof) { + mpctx->eof=1; return -1; - + } + if (dmxret == 0) { + return -1; + } + if (mpctx->sh_video) { current_module = "seek_video_reset"; resync_video_stream(mpctx->sh_video);