-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLAC decoder falls into an infinite read loop if ogg stream serialno changes #568
Comments
Is it possible for you to supply such a file, or point to radio station that streams such files? |
This is one such radio: |
Thanks for providing the stream. This seems related to #254 Can you provide some more information on how you are using libFLAC? It seems you're not using the |
Yes, this seems exactly the #254 issue. |
Here is the code of the test app. Note that it's suited for the radio link I posted - the pulseaudio output is configured for 24-bit 96 kHz. You can also disable audio output by commenting-out
|
Getting this fixed properly will take a lot of work, which has been on my TODO list for more than a year now. There is a PR (#261) implementing basis chaining support, but that doesn't involve seeking, metadata handling etc. It will also require quite a few changes to the API. So, the hack to libogg you mention will have to do for quite some time for your own use case I'm afraid. |
No problem, thanks a lot for the quick response. I hope people who implement FLAC radio streaming will find this thread and not waste too much time solving the issue. |
With some ogg/FLAC online radios, the stream serialno changes with each song. This causes the decoder, at the start of the next song, to enter an infinite loop of calling the read callback and discarding the data, not outputting any decoded data and not returning from
FLAC__stream_decoder_process_single()
until the read callback returns an ABORT. Even if the callback returnsFLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
, the infinite loop is not aborted.Commenting out the line in framing.c in libogg:
if(serialno!=os->serialno)return(-1);
solves the issue for my use case.
The text was updated successfully, but these errors were encountered: