summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-05 00:53:34 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-09 01:40:48 +0100
commit08aa3861e526cbf45ac332294a835358f3903207 (patch)
tree8a6948d9c27828ef22b32f192e5d4f12b70a3b0c /src/lib/ffmpeg_decoder.cc
parent5a980207377e67b6aa3595d0cde441ae7659f5a6 (diff)
Fix decoding of SSA subs in files decoded by FFmpeg (#2904).
Suddenly we have 8 commas, not 9, perhaps because of 29412821241050c846dbceaad4b9752857659977 in ffmpeg (although that's strange, because it was a long time ago).
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index f57c9efe8..a8bfd2a38 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -816,9 +816,9 @@ FFmpegDecoder::process_ass_subtitle (string ass, ContentTime from)
int commas = 0;
string text;
for (size_t i = 0; i < ass.length(); ++i) {
- if (commas < 9 && ass[i] == ',') {
+ if (commas < 8 && ass[i] == ',') {
++commas;
- } else if (commas == 9) {
+ } else if (commas == 8) {
text += ass[i];
}
}