summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-05-29 21:12:17 +0200
committerCarl Hetherington <cth@carlh.net>2024-05-29 21:12:17 +0200
commit07aa4852acfd908c4e3a92f7bed2c7328cfcf123 (patch)
treebe9642b5202a0342be268f6e4b9f93c684bab347 /src/lib/ffmpeg_decoder.cc
parentbfac1d7cfec57b225a0257d2fa0172efe7fbd08b (diff)
parent78dc1250feed93df7f519c559949d4fac4cc5b1a (diff)
Merge remote-tracking branch 'origin/main' into v2.17.x
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index e80cb92e5..29ab5aaf8 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -89,7 +89,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> film, shared_ptr<const FFmp
_pts_offset = {};
}
- if (c->audio && !c->audio->mapping().mapped_output_channels().empty()) {
+ if (c->has_mapped_audio()) {
audio = make_shared<AudioDecoder>(this, c->audio, fast);
}
@@ -830,13 +830,8 @@ FFmpegDecoder::process_ass_subtitle (string ass, ContentTime from)
auto video_size = _ffmpeg_content->video->size();
DCPOMATIC_ASSERT(video_size);
- auto raw = sub::SSAReader::parse_line (
- base,
- text,
- video_size->width,
- video_size->height,
- sub::Colour(1, 1, 1)
- );
+ sub::SSAReader::Context context(video_size->width, video_size->height, sub::Colour(1, 1, 1));
+ auto const raw = sub::SSAReader::parse_line(base, text, context);
for (auto const& i: sub::collect<vector<sub::Subtitle>>(raw)) {
only_text()->emit_plain_start (from, i);