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-05 23:37:22 +0100
commitff8c5e660a4474fa4b790ad676d868c7260d9809 (patch)
tree45982e8bb551d0a814bc31a7b31e40ba147bc0eb /src/lib/ffmpeg_decoder.cc
parentf485d588bebc4bc4039701bb04d7dc83f025d107 (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];
}
}