The above fails if you remove the stream and change the .openFromStream(stream) to .openFromFile("hangs_forever.ogg").
I can't confirm this. It plays fine when I open it with sf::Music directly (using MinGW).
creating stream from ./hangs_forever.ogg
opening from stream
playing...
done playing ./hangs_forever.ogg
Quickly firing up the debugger and stepping through the SFML code, it seems like the OGG file is for some reason throwing off the FLAC decoder. The way SFML has implemented the audio format detection is that it would pass it to the various decoder libraries and let them judge whether it's a format they can read.
For some reason FLAC__stream_decoder_process_until_end_of_metadata never returns when you pass it your stream.
Currently I've something I need to take care of, so I can't further debug the issue, but I think it should be fairly easy to pick up where I left off and dig down where in your stream class starts to hang.
And/or what the FLAC decoder expects the stream to return.