[MPlayer-dev-eng] [PATCH] check if a same sub was already selected
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Apr 6 12:49:53 CEST 2014
On Fri, Apr 04, 2014 at 06:46:41PM +0900, KO Myung-Hun wrote:
> Hi/2.
>
> By this, we can avoid a sub stream is reset even if a same sub was
> already selected.
>
> In practice, this fixes the problem that a white box is shown with -sid
> 0 even if it has a sub track whose id is 0.
>
> --
> KO Myung-Hun
>
> Using Mozilla SeaMonkey 2.7.2
> Under OS/2 Warp 4 for Korean with FixPak #15
> In VirtualBox v4.1.28 on Intel Core i7-3615QM 2.30GHz with 8GB RAM
>
> Korean OS/2 User Community : http://www.ecomstation.co.kr
>
> Index: command.c
> ===================================================================
> --- command.c (revision 37122)
> +++ command.c (working copy)
> @@ -1516,6 +1516,9 @@
> *(int *) arg = -1;
> else if (*(int *) arg >= global_sub_size)
> *(int *) arg = global_sub_size - 1;
> + // already done ?
> + if (mpctx->global_sub_pos == *(int *) arg)
> + return M_PROPERTY_OK;
> mpctx->global_sub_pos = *(int *) arg;
I kind of think this is not a good place to handle it,
also because it will only help for cases where we go
through the command system, not if e.g. one were to use
the demuxer functions directly.
I didn't have time to look into where exactly the code that
causes issues lies, which would be necessary as a first step to figure
out where to place it.
More information about the MPlayer-dev-eng
mailing list