From bf1e0fac94e0d8599c0c540c24883ca5f5ea4131 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Wed, 19 Jun 2024 17:13:01 -0500 Subject: [PATCH] LibMedia/Matroska: Move the definition get_codec_id_for_track up The function is separated from the string-to-enum function it uses, and the order is also inconsistent with header. --- .../LibMedia/Containers/Matroska/MatroskaDemuxer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Userland/Libraries/LibMedia/Containers/Matroska/MatroskaDemuxer.cpp b/Userland/Libraries/LibMedia/Containers/Matroska/MatroskaDemuxer.cpp index a19e0b444ba..e829ea39a59 100644 --- a/Userland/Libraries/LibMedia/Containers/Matroska/MatroskaDemuxer.cpp +++ b/Userland/Libraries/LibMedia/Containers/Matroska/MatroskaDemuxer.cpp @@ -98,6 +98,12 @@ CodecID MatroskaDemuxer::get_codec_id_for_string(FlyString const& codec_id) return CodecID::Unknown; } +DecoderErrorOr MatroskaDemuxer::get_codec_id_for_track(Track track) +{ + auto codec_id = TRY(m_reader.track_for_track_number(track.identifier()))->codec_id(); + return get_codec_id_for_string(codec_id); +} + DecoderErrorOr> MatroskaDemuxer::seek_to_most_recent_keyframe(Track track, Duration timestamp, Optional earliest_available_sample) { // Removing the track status will cause us to start from the beginning. @@ -146,10 +152,4 @@ DecoderErrorOr MatroskaDemuxer::duration() return duration.value_or(Duration::zero()); } -DecoderErrorOr MatroskaDemuxer::get_codec_id_for_track(Track track) -{ - auto codec_id = TRY(m_reader.track_for_track_number(track.identifier()))->codec_id(); - return get_codec_id_for_string(codec_id); -} - }