[vlc-commits] commit: Old RC: remove goto divide-by-two hack (fix #4236) ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Thu Oct 14 18:49:32 CEST 2010
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 14 19:47:15 2010 +0300| [e9d8375664c01f6bf15d037cde58a0acb918eb19] | committer: Rémi Denis-Courmont
Old RC: remove goto divide-by-two hack (fix #4236)
(cherry picked from commit 24188e89e466d724935a05fe67b393b7fb3958ce)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=e9d8375664c01f6bf15d037cde58a0acb918eb19
---
modules/control/rc.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 1e89dfb..62ca2a5 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -1326,15 +1326,14 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
else if (!strcmp( psz_cmd, "goto" ) )
{
int i_pos = atoi( newval.psz_string );
- /* The playlist stores 2 times the same item: onelevel & category */
- int i_size = p_playlist->items.i_size / 2;
+ int i_size = p_playlist->items.i_size;
if( i_pos <= 0 )
msg_rc( "%s", _("Error: `goto' needs an argument greater than zero.") );
else if( i_pos <= i_size )
{
playlist_item_t *p_item, *p_parent;
- p_item = p_parent = p_playlist->items.p_elems[i_pos*2-1];
+ p_item = p_parent = p_playlist->items.p_elems[i_pos-1];
while( p_parent->p_parent )
p_parent = p_parent->p_parent;
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, pl_Unlocked,
More information about the vlc-commits
mailing list