summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-21 20:46:05 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-21 20:46:05 +0000
commit08678c2c6ab9b9b347a71d23d6e9fdf1b5511050 (patch)
tree7447a158dd46816f0847b6ded347e5455c85d494 /mplayer.c
parentae94f470b2fced72661c03eb93ec5ed831cb72d6 (diff)
downloadmpv-08678c2c6ab9b9b347a71d23d6e9fdf1b5511050.tar.bz2
mpv-08678c2c6ab9b9b347a71d23d6e9fdf1b5511050.tar.xz
Avoid crash with video stream switching and -nosound
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26850 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 5a8448f417..057744d042 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3692,7 +3692,9 @@ if (mpctx->sh_audio)
if(!mpctx->sh_video) {
// handle audio-only case:
double a_pos=0;
- if(!quiet || end_at.type == END_AT_TIME )
+ // sh_audio can be NULL due to video stream switching
+ // TODO: handle this better
+ if((!quiet || end_at.type == END_AT_TIME) && mpctx->sh_audio)
a_pos = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out);
if(!quiet)