diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-01-27 23:20:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-16 01:20:17 +0100 |
| commit | 1f4f56b4d5e3d08be5ff823c9890a8b4e0af5967 (patch) | |
| tree | c73cd840eea3b320c3307f4dcd3449fc4e6f1bd1 /src/lib/ffmpeg_content.cc | |
| parent | f015d6b314a6bfc8534e3e2c331d6edd5f817e25 (diff) | |
Separate some things out from the examination process.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 1bc824877..8207ae5f9 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -300,15 +300,9 @@ FFmpegContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool to if (!examiner->audio_streams().empty()) { audio = make_shared<AudioContent>(this); - for (auto i: examiner->audio_streams()) { audio->add_stream(i); } - - auto as = audio->streams().front(); - auto m = as->mapping(); - m.make_default(film ? film->audio_processor() : 0, first_path); - as->set_mapping(m); } _subtitle_streams = examiner->subtitle_streams(); @@ -334,6 +328,23 @@ FFmpegContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool to } +void +FFmpegContent::prepare_for_add_to_film(shared_ptr<const Film> film) +{ + auto first_path = path(0); + + boost::mutex::scoped_lock lm(_mutex); + + if (audio && !audio->streams().empty()) { + auto as = audio->streams().front(); + auto m = as->mapping(); + m.make_default(film->audio_processor(), first_path); + as->set_mapping(m); + } +} + + + string FFmpegContent::summary() const { |
