Open christopher-fu opened 9 years ago
This is great. Thank you!
After running for a while, I noticed some memory leakage...
==29704== LEAK SUMMARY:
==29704== definitely lost: 25,441,600 bytes in 79,505 blocks
==29704== indirectly lost: 13,475,549 bytes in 238,477 blocks
==29704== possibly lost: 29,958 bytes in 259 blocks
==29704== still reachable: 2,930 bytes in 38 blocks
==29704== suppressed: 0 bytes in 0 blocks
I'll keep investigating this unless someone else beats me to it.
I believe 10a4b0f fixes the memory leak.
Indeed it does! However, this PR reintroduces the leak. Moving mpd_song_free(song);
on mpd.cpp:133
down a couple lines to the same scope as mpd_song *song = mpd_run_current_song(_conn);
will clear it up. At least, it worked for me.
The last merge should have included the fix.
What's status of this PR? valgrind does output many errors and reports memory leaks for me. I've fixed radio streams scrobbling in another way(https://github.com/f1u77y/mpdas/commits/handle-streams) when I didn't know about this. Should I make another PR on this or wait for merging this one?
You should definitely submit another PR. I wrote this a while back to solve a problem I had with a certain internet radio stream, and it might not (probably won't?) work for your use case. I also haven't looked closely at any memory leaks other than merging any fixes into my fork.
I'm having issues with this. Here is a screenshot me listening to a local file and then internet radio. The local file goes through but not the song "DOT.EXE - :delta"
my .mpdasrc is just my username and password.
Oone feature that would be pretty cool would be the ability to scrobble tracks from internet radio streams. Right now mpdas only pulls metadata from the ID3 tags associated with the music file using libmpdclient, but there is no such data associated with a stream url. Instead, mpd picks up that data as it streams music from the url. If the currently playing song's title provided by the stream is well-formed (i.e., in the format "Artist - Song Title"), we can parse that and use that to scrobble the song.