summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-08 20:57:03 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-08 20:57:03 +0000
commitd9825793692a41374b184f423994667b663d8526 (patch)
treed1a4a1fd157ea55bbcbf47a6fa55b6c1679daf04 /src/lib/ffmpeg_content.cc
parent2a574403f57ff980ca5e627d389f30e91bff02c7 (diff)
typeid() doesn't seem to downcast, so just check types in the take_settings_from methods (#1192).
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 64da0b1af..06ed5a801 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -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;
}