[vlc-devel] [PATCH 03/10] input/control: INPUT_CLEAR_BOOKMARKS: refactor
Filip Roséen
filip at atch.se
Thu May 18 12:29:44 CEST 2017
---
src/input/control.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/input/control.c b/src/input/control.c
index 5ead47e597..96b0be50e3 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -291,15 +291,11 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
break;
case INPUT_CLEAR_BOOKMARKS:
-
vlc_mutex_lock( &priv->p_item->lock );
- while( priv->i_bookmark > 0 )
- {
- p_bkmk = priv->pp_bookmark[priv->i_bookmark - 1];
+ for( int i = 0; i < priv->i_bookmark; ++i )
+ vlc_seekpoint_Delete( priv->pp_bookmark[i] );
- TAB_REMOVE( priv->i_bookmark, priv->pp_bookmark, p_bkmk );
- vlc_seekpoint_Delete( p_bkmk );
- }
+ TAB_CLEAN( priv->i_bookmark, priv->pp_bookmark );
vlc_mutex_unlock( &priv->p_item->lock );
UpdateBookmarksOption( p_input );
--
2.12.2
More information about the vlc-devel
mailing list