Commit Diff
Commit:
0923bedccbd1064ef8ee9dd15bc6dbc54e1fcb2d
Date:
Sun Mar 13 23:12:38 2022
UTC
Message:
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!
--- 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;
}
Omar Polo