typeid() doesn't seem to downcast, so just check types in the take_settings_from...
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 3cd9d66e2e1c5d034e3510c5475af2b508ba8e17..06ed5a8014f81db7b29b3efe1bf73c1017a789b1 100644 (file)
@@ -397,7 +397,7 @@ FFmpegContent::identifier () const
                s += "_" + video->identifier();
        }
 
-       if (subtitle) {
+       if (subtitle && subtitle->use() && subtitle->burn()) {
                s += "_" + subtitle->identifier();
        }
 
@@ -604,10 +604,13 @@ FFmpegContent::ffmpeg_audio_streams () const
 }
 
 void
-FFmpegContent::use_template (shared_ptr<const Content> c)
+FFmpegContent::take_settings_from (shared_ptr<const Content> c)
 {
-       Content::use_template (c);
-
        shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (c);
+       if (!fc) {
+               return;
+               }
+
+       Content::take_settings_from (c);
        _filters = fc->_filters;
 }