mplayer: Fix audio-only seeking
authoral <al@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 9 Sep 2017 14:56:52 +0000 (14:56 +0000)
committeral <al@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 9 Sep 2017 14:56:52 +0000 (14:56 +0000)
Check if sh_video exists before reading and setting video
frame time.

Regression since r37953, which fixed ticket #2331. I tested
that the fix of #2331 still works after this change.

Fixes ticket #2332

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@37955 b3059339-0415-0410-9bf9-f77b7e298cf2

mplayer.c

index 754fdd0..f061f89 100644 (file)
--- a/mplayer.c
+++ b/mplayer.c
@@ -4034,7 +4034,7 @@ goto_enable_cache:
                 }
 
                 // reset last frame marker
-                if (mpctx->sh_video->frametime < 0)
+                if (mpctx->sh_video && mpctx->sh_video->frametime < 0)
                     mpctx->sh_video->frametime = 1.0f / mpctx->sh_video->fps;
                 rel_seek_secs = 0;
                 abs_seek_pos  = 0;