mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-01-18 12:36:44 +00:00
Compare commits
2 commits
9eaaf6c1cc
...
1c66b3f21f
Author | SHA1 | Date | |
---|---|---|---|
|
1c66b3f21f | ||
|
ff42378834 |
1 changed files with 4 additions and 1 deletions
|
@ -30,9 +30,12 @@ private MediaFormat ParseFormat(Format analysisFormat)
|
|||
};
|
||||
}
|
||||
|
||||
private string GetValue(string tagName, Dictionary<string, string>? tags, string defaultValue) =>
|
||||
tags == null ? defaultValue : tags.TryGetValue(tagName, out var value) ? value : defaultValue;
|
||||
|
||||
private ChapterData ParseChapter(Chapter analysisChapter)
|
||||
{
|
||||
var title = analysisChapter.Tags.FirstOrDefault(t => t.Key == "title").Value;
|
||||
var title = GetValue("title", analysisChapter.Tags, "TitleValueNotSet");
|
||||
var start = MediaAnalysisUtils.ParseDuration(analysisChapter.StartTime);
|
||||
var end = MediaAnalysisUtils.ParseDuration(analysisChapter.EndTime);
|
||||
|
||||
|
|
Loading…
Reference in a new issue