Revert "Use make_shared<>."
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 0f66180d0a6cd80da8f7d4ff16e99e247d8b3f27..b34fdf6aa811bd48fbfecf8a69b25c80ae51eafa 100644 (file)
@@ -73,7 +73,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
        : Content (film, node)
 {
        video = VideoContent::from_xml (this, node, version);
-       audio = AudioContent::from_xml (this, node);
+       audio = AudioContent::from_xml (this, node, version);
        subtitle = SubtitleContent::from_xml (this, node, version);
 
        list<cxml::NodePtr> c = node->node_children ("SubtitleStream");
@@ -218,6 +218,8 @@ FFmpegContent::examine (shared_ptr<Job> job)
                set_default_colour_conversion ();
        }
 
+       boost::filesystem::path first_path = path (0);
+
        {
                boost::mutex::scoped_lock lm (_mutex);
 
@@ -239,7 +241,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
 
                        AudioStreamPtr as = audio->streams().front();
                        AudioMapping m = as->mapping ();
-                       film()->make_audio_mapping_default (m);
+                       film()->make_audio_mapping_default (m, first_path);
                        as->set_mapping (m);
                }