summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-26 00:28:48 +0000
committerpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-26 00:28:48 +0000
commit85e58efc7cf6ba660f64ea40a9fb079006ec57d2 (patch)
treed329b840250af5e87f71d52df4374b88baae3695 /mplayer.c
parent51e17bcc22bb04f93af351412d8b5906667cbdfb (diff)
downloadmpv-85e58efc7cf6ba660f64ea40a9fb079006ec57d2.tar.bz2
mpv-85e58efc7cf6ba660f64ea40a9fb079006ec57d2.tar.xz
avoids segfaults w.r.t to mp3 files handling:
hunk1 => mplayer -fps 42 foobar.mp3 (yeah it's a bit dumb but... ;) hunk2 => mplayer *.mp3 + next file + volume increase hunk3 => preventive bugfix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7924 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mplayer.c b/mplayer.c
index ba567aa1a8..9054051205 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1367,7 +1367,7 @@ if (!sh_video && !sh_audio)
goto goto_next_file;
if(demuxer->file_format!=DEMUXER_TYPE_AVI) pts_from_bps=0; // it must be 0 for mpeg/asf!
-if(force_fps){
+if(force_fps && sh_video){
vo_fps = sh_video->fps=force_fps;
sh_video->frametime=1.0f/sh_video->fps;
mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,sh_video->fps,sh_video->frametime);
@@ -1970,7 +1970,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
}
#ifdef USE_OSD
- if(osd_level){
+ if(osd_level && sh_video){
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_VOLUME;
vo_osd_progbar_value=(mixer_getbothvolume()*256.0)/100.0;
@@ -2212,7 +2212,7 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
vo_panscan = res > 1 ? 1 : res < 0 ? 0 : res;
video_out->control( VOCTRL_SET_PANSCAN,NULL );
#ifdef USE_OSD
- if(osd_level){
+ if(osd_level && sh_video){
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_PANSCAN;
vo_osd_progbar_value=vo_panscan*256;