[vlc-commits] input/control: INPUT_CLEAR_BOOKMARKS: refactor
Filip Roséen
git at videolan.org
Thu May 18 18:20:56 CEST 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu May 18 12:29:44 2017 +0200| [dad9f51d64b43dbc3ac8386ecd47d97a661c91ec] | committer: Rémi Denis-Courmont
input/control: INPUT_CLEAR_BOOKMARKS: refactor
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dad9f51d64b43dbc3ac8386ecd47d97a661c91ec
---
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 );
More information about the vlc-commits
mailing list