mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-05 17:49:16 +03:00
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.
This commit is contained in:
parent
55fda2068b
commit
bf1e0fac94
Notes:
sideshowbarker
2024-07-16 23:34:49 +09:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/bf1e0fac94 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/230 Reviewed-by: https://github.com/ADKaster
@ -98,6 +98,12 @@ CodecID MatroskaDemuxer::get_codec_id_for_string(FlyString const& codec_id)
|
||||
return CodecID::Unknown;
|
||||
}
|
||||
|
||||
DecoderErrorOr<CodecID> 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<Optional<Duration>> MatroskaDemuxer::seek_to_most_recent_keyframe(Track track, Duration timestamp, Optional<Duration> earliest_available_sample)
|
||||
{
|
||||
// Removing the track status will cause us to start from the beginning.
|
||||
@ -146,10 +152,4 @@ DecoderErrorOr<Duration> MatroskaDemuxer::duration()
|
||||
return duration.value_or(Duration::zero());
|
||||
}
|
||||
|
||||
DecoderErrorOr<CodecID> 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user