Recover from FLAC decoding errors#2315
Recover from FLAC decoding errors#2315daschuer merged 2 commits intomixxxdj:2.2from uklotzde:2.2_flac_decoding_errors
Conversation
|
By chance, is this also fixing https://bugs.launchpad.net/mixxx/+bug/1846409 ? |
No, FLAC decoding worked and still works perfectly. This PR only fixes issues with really bad and corrupt files. |
|
My mistake, encoding/decoding :) |
|
@ronso0 Nevertheless please forward the file also to me (Zulip link or e-mail), just in case. |
| << "Resetting decoder after failure to skip preceding frames" | ||
| << precedingFrames; | ||
| if (!FLAC__stream_decoder_reset(m_decoder)) { | ||
| kLogger.critical() |
There was a problem hiding this comment.
This crashes Mixxx, right? Doe we have alternatives?
There was a problem hiding this comment.
Not by default: "It exits if the environment variable QT_FATAL_CRITICALS is not empty."
There was a problem hiding this comment.
If even resetting the decoder fails then we are in big trouble. Like a destructor this operation should never fail, but the API allows failure and we need to handle this case.
There was a problem hiding this comment.
Playback was stuttering and Mixxx became almost unusable when not resetting the decoder. This is already our very last chance. If even this option fails everything is lost.
This is still only a DJ application, not the control unit of some deadly weapon. Let's keep things in perspective.
|
LGTM. Thank you. |
Retested corrupt files and fixed some hiccups.