Web lists-archives.com

Re: [MPlayer-dev-eng] gui: subtitle menu is not populated when playing from mpg file

Reimar Döffinger wrote on Wed, 13 Aug 2014 21:42:24 +0200:

> Not completely convinced it's better, but I'm happy to let you decide.

Without merging we'd have to ensure up-to-dateness of global_sub_pos prior
to accessing it as well. This will kill two birds with one stone and leave
update_global_sub_size() static.

> However that pointless return should go.

Oops! That's a leftover from a version returning a success code. (See below
why I decided against it.)

> Or better yet, return on of these via the return value.
> My first instinct would have been the pos, but size would make
> the code smaller.

Exactly that was my quandary. Which value should be returned and which one
should be in the argument list? Both seem of equal value, so put them both
into the argument list making mpctx_get_global_sub_info() look less obscure.

> I also think mp_property_do can fail (?), if yes it would be nice
> to ensure something reasonable and detectable happens in that case.

The only "failure" with the sub command occurs when passing NULL for arg/pos
(resulting in not getting the information). But since that seems to be ok for
calling mpctx_get_global_sub_info() and since I'm allowing NULL for size, no
real failure can occur. In both cases we have nothing but simple variable
assignments. Thus no reason for a return code.

MPlayer-dev-eng mailing list