diff mplayer.c @ 36406:c918845d0d9a

mplayer: Fix a crash seeking with -chapter and -ass When seeking to chapter on startup the mpctx->d_sub member is not yet initialized. Do not access it in that case. The commit r31293 that introduced that code explains that it is for handling backward seeking correctly. So it should not be needed on startup forward seek situation.
author al
date Fri, 08 Nov 2013 21:06:40 +0000
parents 99708d402208
children b9cc6e7cd0a8
line wrap: on
line diff
--- a/mplayer.c	Fri Nov 08 16:59:55 2013 +0000
+++ b/mplayer.c	Fri Nov 08 21:06:40 2013 +0000
@@ -2746,7 +2746,7 @@
     }
 
 #ifdef CONFIG_ASS
-    if (ass_enabled && mpctx->d_sub->sh && ((sh_sub_t *)mpctx->d_sub->sh)->ass_track)
+    if (ass_enabled && mpctx->d_sub && mpctx->d_sub->sh && ((sh_sub_t *)mpctx->d_sub->sh)->ass_track)
         ass_flush_events(((sh_sub_t *)mpctx->d_sub->sh)->ass_track);
 #endif