1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-14 10:55:43 +00:00

avoid segfault with -vc dummy

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13650 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2004-10-15 16:11:30 +00:00
parent 195f0466d5
commit b7e93ce09e

View File

@ -417,7 +417,7 @@ int demux_mpg_control(demuxer_t *demuxer,int cmd, void *arg){
switch(cmd) {
case DEMUXER_CTRL_GET_TIME_LENGTH:
if(!sh_video->i_bps) // unspecified or VBR
if(!sh_video || !sh_video->i_bps) // unspecified or VBR
return DEMUXER_CTRL_DONTKNOW;
*((unsigned long *)arg)=(demuxer->movi_end-demuxer->movi_start)/sh_video->i_bps;
return DEMUXER_CTRL_GUESS;