changeset 31048:ba91602b82c5

Fix crash if a DVD is played with dvdnav:// and without video (e.g. because vo initialization failed).
author reimar
date Sun, 25 Apr 2010 16:09:56 +0000
parents 745f9833930b
children b40e41324173
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sun Apr 25 15:49:46 2010 +0000
+++ b/mplayer.c	Sun Apr 25 16:09:56 2010 +0000
@@ -3894,7 +3894,8 @@
 
    if (mp_dvdnav_stream_has_changed(mpctx->stream)) {
      double ar = -1.0;
-     if (stream_control (mpctx->demuxer->stream,
+     if (mpctx->sh_video &&
+         stream_control (mpctx->demuxer->stream,
                          STREAM_CTRL_GET_ASPECT_RATIO, &ar)
          != STREAM_UNSUPPORTED)
        mpctx->sh_video->stream_aspect = ar;