diff options
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |