[vlc-devel] [PATCH 2/4] input/var: fix deletion of title navigation callbacks
Filip Roséen
filip at videolabs.io
Sat Jul 16 22:38:26 CEST 2016
Just as it does not make sense to add callbacks for {next,prev}-title
and menu-{popup,title} if we do not have more than one title, it does
not make sense to delete such callbacks under the same condition
(especially since we would delete in cases we do not create).
--
This patch fixes the bug linked below:
- https://trac.videolan.org/vlc/ticket/17021
The underlying cause is that we only create the variables under the
previously mentioned condition, but we formerly tried to remove them in
an asymmetric manner.
refs #17021
---
src/input/var.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/input/var.c b/src/input/var.c
index eb64cc7..9423996 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -230,9 +230,11 @@ void input_ControlVarStop( input_thread_t *p_input )
if( !p_input->b_preparsing )
InputDelCallbacks( p_input, p_input_callbacks );
+ if( p_input->p->i_title > 1 )
+ InputDelCallbacks( p_input, p_input_title_navigation_callbacks );
+
if( p_input->p->i_title > 0 )
{
- InputDelCallbacks( p_input, p_input_title_navigation_callbacks );
InputDelCallbacks( p_input, p_input_seekpoint_navigation_callbacks );
for( int i = 0; i < p_input->p->i_title; i++ )
--
2.9.0
More information about the vlc-devel
mailing list