mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 22:57:42 +00:00
fix for crash when seeking with -novideo option
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12968 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
adad534913
commit
f7e04468d6
@ -366,7 +366,7 @@ void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags){
|
||||
newpos+=(demuxer->movi_end-demuxer->movi_start)*rel_seek_secs;
|
||||
} else {
|
||||
// time seek (secs)
|
||||
if(!sh_video->i_bps) // unspecified or VBR
|
||||
if(!sh_video || !sh_video->i_bps) // unspecified or VBR
|
||||
newpos+=2324*75*rel_seek_secs; // 174.3 kbyte/sec
|
||||
else
|
||||
newpos+=sh_video->i_bps*rel_seek_secs;
|
||||
|
Loading…
Reference in New Issue
Block a user