diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-21 19:37:16 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-21 19:37:16 +0000 |
| commit | 546e9b703d0a792a75e2f5fffb064191c791d240 (patch) | |
| tree | bf010547d1d073f351c39527bc701c490fc509bf | |
| parent | cbdc27e678289a37eb97256cedf4647576a57646 (diff) | |
Fix recognition of MXF-wrapped subtitle content vs audio/video.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | src/lib/content_factory.cc | 12 |
3 files changed, 9 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2015-01-21 Carl Hetherington <cth@carlh.net> + + * Fix differentiation between MXF-wrapped subtitles + and video/audio content. + 2015-01-20 Carl Hetherington <cth@carlh.net> * Version 2.0.35 released. @@ -156,7 +156,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', 'f69bb08'), - ('libdcp', '5b519d9'), + ('libdcp', 'a8d0450'), ('libsub', 'f66b11f')) def build(target, options): diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index ed00639a0..f4d9fe4e9 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -29,6 +29,7 @@ #include "dcp_subtitle_content.h" #include "util.h" #include <libcxml/cxml.h> +#include <dcp/smpte_subtitle_content.h> using std::string; using std::list; @@ -86,15 +87,8 @@ content_factory (shared_ptr<const Film> film, boost::filesystem::path path) content.reset (new SubRipContent (film, path)); } else if (ext == ".xml") { content.reset (new DCPSubtitleContent (film, path)); - } else if (ext == ".mxf") { - /* Try to read this .mxf as a subtitle file; if we fail, we fall back - to using FFmpeg below. - */ - try { - content.reset (new DCPSubtitleContent (film, path)); - } catch (...) { - - } + } else if (ext == ".mxf" && dcp::SMPTESubtitleContent::valid_mxf (path)) { + content.reset (new DCPSubtitleContent (film, path)); } if (!content) { |
