changeset 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 3dfe2b0db098
children 4a2171d83c8e
files mplayer.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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