[MPlayer-dev-eng] gui: subtitle menu is not populated when playing from mpg file
Ingo Brückl
ib at wupperonline.de
Wed Aug 13 19:00:09 CEST 2014
I wrote on Tue, 12 Aug 2014 21:04:21 +0200:
> Reimar Döffinger wrote Tue, 12 Aug 2014 20:15:05 +0200:
>> I was just more wondering why it doesn't happen automatically once we
>> got a new subtitle stream, instead of on every read of that variable.
> On getting a new subtitle stream we only have access to the demuxer
> (variable), the global sub stuff is stored whithin the mpctx.
> I could try moving the global sub information to the demuxer, [...]
Although mpctx's global_sub_size is globally accessible, it's basically local
to command.c, i.e. it's being updated only there (in update_global_sub_size()).
Moreover, since it counts all subtitles we won't achieve much (but new
problems) on relocating it to the demuxer just in order to be able to count
the demuxer subtitles. There are file and vob subtitles as well.
The following patch for the global_sub_size issue is bigger and seems more
complicated than the last one, but it is better.
The two mpctx_get_global_sub_*() functions (currently only used by the GUI)
merge into one. The pos is retrieved by a mp_property_do("sub") command which
performs the necessary update of the global_sub-* variables. As a result,
update_global_sub_size() can remain static.
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: global_sub.patch
Type: text/x-diff
Size: 3340 bytes
Desc: not available
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140813/3f9b691c/attachment.bin>
More information about the MPlayer-dev-eng
mailing list