typeid() doesn't seem to downcast, so just check types in the take_settings_from...
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 64da0b1af0b71d2f8e8d6909655a8ed08a896e41..06ed5a8014f81db7b29b3efe1bf73c1017a789b1 100644 (file)
@@ -606,8 +606,11 @@ FFmpegContent::ffmpeg_audio_streams () const
 void
 FFmpegContent::take_settings_from (shared_ptr<const Content> c)
 {
-       Content::take_settings_from (c);
-
        shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (c);
+       if (!fc) {
+               return;
+               }
+
+       Content::take_settings_from (c);
        _filters = fc->_filters;
 }