[MPlayer-cvslog] r36502 - trunk/mplayer.c

al subversion at mplayerhq.hu
Fri Nov 8 22:06:40 CET 2013


Author: al
Date: Fri Nov  8 22:06:40 2013
New Revision: 36502

Log:
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.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Fri Nov  8 17:59:55 2013	(r36501)
+++ trunk/mplayer.c	Fri Nov  8 22:06:40 2013	(r36502)
@@ -2746,7 +2746,7 @@ static int seek(MPContext *mpctx, double
     }
 
 #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
 


More information about the MPlayer-cvslog mailing list