andrewrk / libgroove

streaming audio processing library
http://andrewrk.github.io/libgroove/
MIT License
293 stars 35 forks source link

groove_playlist_insert misses linking next->prev #123

Closed kalhartt closed 8 years ago

kalhartt commented 8 years ago

I'm having an issue replacing the first element in a playlist doing something like the following:

GroovePlaylist *playlist = ...; // Some playlist with a few items in it
GrooveFile *newItem = ...; // Some new file
groove_playlist_insert(playlist, newItem, 1.0, 1.0, playlist.head);
groove_playlist_remove(playlist, playlist.head);

The next->prev = item should be outside of the if( next->prev ) in playlist.c:L1317 right?

andrewrk commented 8 years ago

Nice find. I think you're right. I'll fix this in the master branch which will be 5.0.0 - which is not ready for release yet. Would you also like me to fix this in another branch and release 4.3.1?

kalhartt commented 8 years ago

That's great, thanks! It's not critical for me, so you don't have to do a release for it.