[MPlayer-users] subtitle disordered when using slave mode

Zongyao QU zongyao.qu at gmail.com
Mon Apr 25 04:07:45 CEST 2011


Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> 
> On Sun, Apr 24, 2011 at 08:11:54AM +0000, Zongyao QU wrote:
> > how to reproduce the bug?
> > 
> > 1. open a file with internal subtitle, for example, XXX.mkv
> >  ./mplayer -slave -quiet -font xxx.ttf  XXX.mkv
> > 
> > 2. set_property sub 0
> > then you could make sure that 0 means 
> > the internal sub track.
> > 
> > 3. use sub_load to load another subtitle
> > sub_load aaa/bbb/ccc.srt
> > 
> > 4. set_property sub 0
> > you will see that the ccc.srt will be displayed.
> > 
> > but
> > set_property sub 1 
> > will make internal sub displayed.
> > 
> > I think the sub track id should be consistent, but it is not
> > 
> > and this seams only happens when
> > 1. internal + external sub
> > 2. external sub should be loaded in the runtime, 
> >      rather than by the cmdline
> 
> Uh, I don't see how this should be possible to solve, there
> is no way to have two subs with id 0, and having the internal
> subs first would result in a total mess e.g. with MPEG-TS where
> new internal subtitles could be added at any point.
> You are aware of the sub_demux, sub_file and sub_vob properties?!

Thank you for you reply.
But I don't think it is the reason of set_property sub should mis-behave.

Dug into the code a little bit, the parameter used in [set_property sub] is 
mpctx->global_sub_pos,
in sub_source_and_index_by_pos, which is called in sub_source and 
sub_source_pos, 

since SUB_SOURCE_SUBS is 0, SUB_SOURCE_DEMUX is 2, so that, the SUBS subs are 
always found first, then the DEMUX subs.




More information about the MPlayer-users mailing list