diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-05 00:53:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-12-05 23:37:22 +0100 |
| commit | ff8c5e660a4474fa4b790ad676d868c7260d9809 (patch) | |
| tree | 45982e8bb551d0a814bc31a7b31e40ba147bc0eb /src/lib/ffmpeg_decoder.cc | |
| parent | f485d588bebc4bc4039701bb04d7dc83f025d107 (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.cc | 4 |
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]; } } |
