| 287 | } |
| 288 | |
| 289 | static bool |
| 290 | FlacInitAndDecode(FlacDecoder &data, FLAC__StreamDecoder *sd, bool is_ogg) |
| 291 | { |
| 292 | auto init_status = stream_init(sd, &data, is_ogg); |
| 293 | if (init_status != FLAC__STREAM_DECODER_INIT_STATUS_OK) { |
| 294 | LogWarning(flac_domain, |
| 295 | FLAC__StreamDecoderInitStatusString[init_status]); |
| 296 | return false; |
| 297 | } |
| 298 | |
| 299 | bool result = flac_decoder_initialize(&data, sd); |
| 300 | if (result) |
| 301 | flac_decoder_loop(&data, sd); |
| 302 | |
| 303 | FLAC__stream_decoder_finish(sd); |
| 304 | return result; |
| 305 | } |
| 306 | |
| 307 | static void |
| 308 | flac_decode_internal(DecoderClient &client, |
no test coverage detected