summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-12 12:02:29 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-12 12:02:29 +0100
commit0d65e6ab06f798ca905c0ae5c1d0203ac254377c (patch)
treee0886915a48374c8febc825cfc2c50cc20a2e606 /src
parent26a4961cfb36a7dd47387122d1138468a5ce672a (diff)
Un-map non-selected audio streams when loading old files.
Diffstat (limited to 'src')
-rw-r--r--src/lib/ffmpeg_content.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 9dc4afab9..608c8cdb7 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -79,6 +79,10 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> f, cxml::ConstNodePtr node,
c = node->node_children ("AudioStream");
for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
_audio_streams.push_back (shared_ptr<FFmpegAudioStream> (new FFmpegAudioStream (*i, version)));
+ if (version < 11 && !(*i)->optional_node_child ("Selected")) {
+ /* This is an old file and this stream is not selected, so un-map it */
+ _audio_streams.back()->set_mapping (AudioMapping (_audio_streams.back()->channels (), MAX_DCP_AUDIO_CHANNELS));
+ }
}
c = node->node_children ("Filter");