[vlc-devel] [PATCH] Don't restart playlist after converting current item to node

bl4 bl4 at playker.info
Sun Jul 6 23:27:21 CEST 2008


Playlist is restarted after converting current item to node (for example 
when reading a directory).

Suppose there are 3 files: 1.mp3, 2.mp3, d/3.mp3

When I run vlc like this: `vlc 1.mp3 2.mp3 d`
it plays the items in following order: 1.mp3, 2.mp3, 1.mp3, 2.mp3, d/3.mp3

It's because when the current item is converted to node, it's removed 
from the onelevel playlist but p_playlist->status.p_item is not updated. 
After that, ResetCurrentlyPlaying function is called to set the current 
index. It can't find status.p_item inside status.p_node so it sets the 
index to -1 and the playlist is restarted.

This patch updates p_playlist->status.p_item to point at the previous 
item when converting current item to node so ResetCurrentlyPlaying can 
find it and the index is incremented correctly.

-- 
bl4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-restart-playlist-after-converting-current-item.patch
Type: text/x-patch
Size: 1717 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080706/97d3cce2/attachment.bin>


More information about the vlc-devel mailing list