[vlc-commits] es_out: unselect the main es before selecting a new one
Thomas Guillem
git at videolan.org
Tue Jan 23 12:53:35 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jan 22 13:24:05 2018 +0100| [61717b6be107432c6d1e077053e1d9cc7ea2615f] | committer: Thomas Guillem
es_out: unselect the main es before selecting a new one
This avoids having more than one decoder per es and maybe more than one
aout/vout at the same time.
Fixes #19206
(cherry picked from commit 5ff52a41a8e62ee0e818676be066da83a53d8ef4)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=61717b6be107432c6d1e077053e1d9cc7ea2615f
---
src/input/es_out.c | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 9bcf6544e3..ac91fa8005 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1864,10 +1864,19 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
return;
}
+ bool b_auto_unselect = p_esprops && p_sys->i_mode == ES_OUT_MODE_AUTO &&
+ p_esprops->e_policy == ES_OUT_ES_POLICY_EXCLUSIVE &&
+ p_esprops->p_main_es && p_esprops->p_main_es != es;
+
if( p_sys->i_mode == ES_OUT_MODE_ALL || b_force )
{
if( !EsIsSelected( es ) )
+ {
+ if( b_auto_unselect )
+ EsUnselect( out, p_esprops->p_main_es, false );
+
EsSelect( out, es );
+ }
}
else if( p_sys->i_mode == ES_OUT_MODE_PARTIAL )
{
@@ -1968,23 +1977,17 @@ static void EsOutSelect( es_out_t *out, es_out_id_t *es, bool b_force )
}
if( wanted_es == es && !EsIsSelected( es ) )
- EsSelect( out, es );
- }
-
- /* FIXME TODO handle priority here */
- if( p_esprops && EsIsSelected( es ) )
- {
- if( p_sys->i_mode == ES_OUT_MODE_AUTO )
{
- if( p_esprops->e_policy == ES_OUT_ES_POLICY_EXCLUSIVE &&
- p_esprops->p_main_es &&
- p_esprops->p_main_es != es )
- {
+ if( b_auto_unselect )
EsUnselect( out, p_esprops->p_main_es, false );
- }
- p_esprops->p_main_es = es;
+
+ EsSelect( out, es );
}
}
+
+ /* FIXME TODO handle priority here */
+ if( p_esprops && p_sys->i_mode == ES_OUT_MODE_AUTO && EsIsSelected( es ) )
+ p_esprops->p_main_es = es;
}
static void EsOutCreateCCChannels( es_out_t *out, vlc_fourcc_t codec, uint64_t i_bitmap,
More information about the vlc-commits
mailing list