* Check if a new stream tag was received and pass it to * DecoderClient::SubmitTag(). */
| 436 | * DecoderClient::SubmitTag(). |
| 437 | */ |
| 438 | static void |
| 439 | FfmpegCheckTag(DecoderClient &client, InputStream *is, |
| 440 | AVFormatContext &format_context, int audio_stream) noexcept |
| 441 | { |
| 442 | AVStream &stream = *format_context.streams[audio_stream]; |
| 443 | if ((stream.event_flags & AVSTREAM_EVENT_FLAG_METADATA_UPDATED) == 0) |
| 444 | /* no new metadata */ |
| 445 | return; |
| 446 | |
| 447 | /* clear the flag */ |
| 448 | stream.event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED; |
| 449 | |
| 450 | TagBuilder tag; |
| 451 | FfmpegScanTag(format_context, audio_stream, tag); |
| 452 | if (!tag.empty()) |
| 453 | client.SubmitTag(is, tag.Commit()); |
| 454 | } |
| 455 | |
| 456 | static bool |
| 457 | IsSeekable(const AVFormatContext &format_context) noexcept |
no test coverage detected