From 4085c25ee858f6f6bf7d4b2b85a0c45211169c49 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 14 Jan 2024 18:49:12 +0100 Subject: [PATCH] A little more #7839 --- src/libse/SubtitleFormats/AdvancedSubStationAlpha.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libse/SubtitleFormats/AdvancedSubStationAlpha.cs b/src/libse/SubtitleFormats/AdvancedSubStationAlpha.cs index a29d2c47c..ea1c345eb 100644 --- a/src/libse/SubtitleFormats/AdvancedSubStationAlpha.cs +++ b/src/libse/SubtitleFormats/AdvancedSubStationAlpha.cs @@ -190,10 +190,14 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text" { style = p.Extra; } - else if (styles.Count > 0 && !styles.Contains(style) && (string.IsNullOrEmpty(p.Extra) || styles.Contains(p.Extra))) + else if (styles.Count > 0 && !styles.Contains(style) && styles.Contains(p.Extra)) { style = p.Extra; } + else if (styles.Count > 0 && string.IsNullOrEmpty(p.Extra)) + { + style = styles[0]; + } if (fromTtml && !string.IsNullOrEmpty(p.Style) && isValidAssHeader && styles.Contains(p.Style)) {