commit 0923bedccbd1064ef8ee9dd15bc6dbc54e1fcb2d from: Omar Polo date: Sun Mar 13 23:12:38 2022 UTC second part of the "unbroke flac" in 0da0ad46 i got the return value wrong, so flac are broken wrt stop/next/previous (which are all stops from the player process pov.) Reported also by Dirk-Wilhelm Peters, thanks! commit - 3c18f4385ec5789b4eac97f5559ff508843d5d4f commit + 0923bedccbd1064ef8ee9dd15bc6dbc54e1fcb2d blob - 5fba895ad5458c528270ddc6c0f8f3cd86342359 blob + 13cfcb2a24ee1decf162ba0cff9233a17d5a9211 --- player_flac.c +++ player_flac.c @@ -115,12 +115,12 @@ play_flac(int fd) FLAC__stream_decoder_delete(decoder); fclose(f); - if (!ok && s != FLAC__STREAM_DECODER_ABORTED) { + if (s == FLAC__STREAM_DECODER_ABORTED) + return 1; + else if (!ok) { state = FLAC__StreamDecoderStateString[s]; log_warnx("decoding failed; state: %s", state); - return 1; - } - if (!ok) return -1; - return 0; + } else + return 0; }