From 2bdb9a4e253d35373d337d27e22a6f94b73f4348 Mon Sep 17 00:00:00 2001 From: arpi Date: Tue, 28 Aug 2001 22:24:02 +0000 Subject: [PATCH] sig11 for abs seek in bad avi file fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1738 b3059339-0415-0410-9bf9-f77b7e298cf2 --- demux_avi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demux_avi.c b/demux_avi.c index 0111dbf86f..afb3659623 100644 --- a/demux_avi.c +++ b/demux_avi.c @@ -497,8 +497,8 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){ int total=sh_video->video.dwLength; if(total<=1){ // bad video header, try to get it from audio - total=sh_video->fps*sh_audio->audio.dwLength/sh_audio->wf->nAvgBytesPerSec; - if(total<1){ + if(sh_audio) total=sh_video->fps*sh_audio->audio.dwLength/sh_audio->wf->nAvgBytesPerSec; + if(total<=1){ mp_msg(MSGT_SEEK,MSGL_WARN,"Couldn't determine number of frames (for absoulte seek) \n"); total=0; }