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

ulion subversion at mplayerhq.hu
Sun Nov 4 06:23:47 CET 2007


Author: ulion
Date: Sun Nov  4 06:23:46 2007
New Revision: 24962

Log:
Old code for dvdsub_id fix assume the global_sub_indices[SUB_SOURCE_DEMUX]
must be zero when use a dvdsub_id greater than max sub id from demux.
To remove the implicit assumption, make it up here.


Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Sun Nov  4 06:23:46 2007
@@ -3019,7 +3019,9 @@ if (mpctx->stream->type != STREAMTYPE_DV
       maxid = FFMAX(maxid, ((sh_sub_t *)mpctx->demuxer->s_streams[i])->sid);
   mpctx->global_sub_size += maxid + 1;
 }
-if (mpctx->global_sub_size <= dvdsub_id) mpctx->global_sub_size = dvdsub_id + 1;
+// Make dvdsub_id always selectable if set.
+if (mpctx->global_sub_size <= mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id)
+  mpctx->global_sub_size = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id + 1;
 
 current_module="demux_open2";
 



More information about the MPlayer-cvslog mailing list