[MPlayer-cvslog] r23827 - trunk/mplayer.c
reimar
subversion at mplayerhq.hu
Thu Jul 19 19:14:49 CEST 2007
Author: reimar
Date: Thu Jul 19 19:14:49 2007
New Revision: 23827
Log:
Make sure all demuxer subtitles can be selected with 'j', even
if this leaves "holes" (allows to select subtitles that do not exist).
Fixes subtitle switching with http://samples.mplayerhq.hu/sub/NeroMP4/unsupported-embedded-subs-2.mp4
Modified:
trunk/mplayer.c
Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c (original)
+++ trunk/mplayer.c Thu Jul 19 19:14:49 2007
@@ -3011,11 +3011,13 @@ inited_flags|=INITED_DEMUXER;
if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_DVDNAV) {
int i;
+ int maxid = -1;
// setup global sub numbering
mpctx->global_sub_indices[SUB_SOURCE_DEMUX] = mpctx->global_sub_size; // the global # of the first demux-specific sub.
for (i = 0; i < MAX_S_STREAMS; i++)
if (mpctx->demuxer->s_streams[i])
- mpctx->global_sub_size++;
+ 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;
More information about the MPlayer-cvslog
mailing list