Various work on audio mapping.
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index fa2671b3697c2663060d7403863421bf72b1f04c..9dc4afab9b3b1233d7f6d60301fccadef72475e9 100644 (file)
@@ -51,8 +51,7 @@ using boost::dynamic_pointer_cast;
 
 int const FFmpegContentProperty::SUBTITLE_STREAMS = 100;
 int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
-int const FFmpegContentProperty::AUDIO_STREAMS = 102;
-int const FFmpegContentProperty::FILTERS = 103;
+int const FFmpegContentProperty::FILTERS = 102;
 
 FFmpegContent::FFmpegContent (shared_ptr<const Film> f, boost::filesystem::path p)
        : Content (f, p)
@@ -173,7 +172,9 @@ FFmpegContent::examine (shared_ptr<Job> job)
                _audio_streams = examiner->audio_streams ();
 
                if (!_audio_streams.empty ()) {
-                       _audio_streams.front()->mapping().make_default ();
+                       AudioMapping m = _audio_streams.front()->mapping ();
+                       film->make_audio_mapping_default (m);
+                       _audio_streams.front()->set_mapping (m);
                }
 
                _first_video = examiner->first_video ();
@@ -181,7 +182,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
 
        signal_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
        signal_changed (FFmpegContentProperty::SUBTITLE_STREAM);
-       signal_changed (FFmpegContentProperty::AUDIO_STREAMS);
+       signal_changed (AudioContentProperty::AUDIO_STREAMS);
 }
 
 string