From: Carl Hetherington Date: Fri, 12 Jun 2015 11:02:29 +0000 (+0100) Subject: Un-map non-selected audio streams when loading old files. X-Git-Tag: v2.0.51~7 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=0d65e6ab06f798ca905c0ae5c1d0203ac254377c Un-map non-selected audio streams when loading old files. --- diff --git a/ChangeLog b/ChangeLog index 11b48165d..e750f8260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-12 c.hetherington + + * Fix for every audio stream being mapped to the DCP when loading + old films. + 2015-06-11 c.hetherington * Fix massive slowdown of direct J2K->DCP encodes (#599). 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 f, cxml::ConstNodePtr node, c = node->node_children ("AudioStream"); for (list::const_iterator i = c.begin(); i != c.end(); ++i) { _audio_streams.push_back (shared_ptr (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");