changeset 12967:1dc4d1723f88

fix for crash when seeking with -novideo option
author reimar
date Sat, 07 Aug 2004 14:20:28 +0000
parents 4e7d8679d6d8
children 55e13005ac30
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Sat Aug 07 14:15:55 2004 +0000
+++ b/libmpdemux/demux_mpg.c	Sat Aug 07 14:20:28 2004 +0000
@@ -366,7 +366,7 @@
 	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;