summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)