summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-15 13:53:51 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-15 13:53:51 +0000
commit5d3ebbb2e7844485e8dddd6471209d56b05633ae (patch)
treeab1190b8789ebda46be3f2fdde05ce3332241940 /src/lib/ffmpeg_content.cc
parent16e8c1c7222796246f74153bf294909c3efe57dc (diff)
Cope with loading films with now-disabled filters.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index e52e36f78..fadeec9cd 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -58,7 +58,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> f, boost::filesystem::path
}
-FFmpegContent::FFmpegContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int version)
+FFmpegContent::FFmpegContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node, int version, list<string>& notes)
: Content (f, node)
, VideoContent (f, node, version)
, AudioContent (f, node)
@@ -82,7 +82,12 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> f, shared_ptr<const cxml::N
c = node->node_children ("Filter");
for (list<cxml::NodePtr>::iterator i = c.begin(); i != c.end(); ++i) {
- _filters.push_back (Filter::from_id ((*i)->content ()));
+ Filter const * f = Filter::from_id ((*i)->content ());
+ if (f) {
+ _filters.push_back (f);
+ } else {
+ notes.push_back (String::compose (_("DCP-o-matic no longer supports the `%1' filter, so it has been turned off."), (*i)->content()));
+ }
}
_first_video = node->optional_number_child<double> ("FirstVideo");