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

reimar subversion at mplayerhq.hu
Sat Feb 13 12:38:36 CET 2010


Author: reimar
Date: Sat Feb 13 12:38:36 2010
New Revision: 30548

Log:
Move the check for valid sh_video into the init_vo_spudec, this fixes a crash
when command.c calls this function without having to duplicate the check.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Fri Feb 12 21:38:29 2010	(r30547)
+++ trunk/mplayer.c	Sat Feb 13 12:38:36 2010	(r30548)
@@ -1138,6 +1138,11 @@ void init_vo_spudec(void) {
     spudec_free(vo_spudec);
   initialized_flags &= ~INITIALIZED_SPUDEC;
   vo_spudec = NULL;
+
+  // we currently can't work without video stream
+  if (!mpctx->sh_video)
+    return;
+
   if (spudec_ifo) {
     unsigned int palette[16], width, height;
     current_module="spudec_init_vobsub";
@@ -3514,7 +3519,7 @@ if(!mpctx->sh_video && !mpctx->sh_audio)
 demux_info_print(mpctx->demuxer);
 
 //================== Read SUBTITLES (DVD & TEXT) ==========================
-if(vo_spudec==NULL && mpctx->sh_video &&
+if(vo_spudec==NULL &&
      (mpctx->stream->type==STREAMTYPE_DVD || mpctx->stream->type == STREAMTYPE_DVDNAV)){
   init_vo_spudec();
 }


More information about the MPlayer-cvslog mailing list