[PATCH] check if a same sub was already selected
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
Ping ? 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.
already_done.diff
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; break; case M_PROPERTY_STEP_UP:
_______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
-- 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
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.
participants (2)
-
KO Myung-Hun -
Reimar Döffinger