diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-09 02:30:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-09 02:30:18 +0100 |
| commit | 7bb241e6857f5f3614fd3b8722d545e85a6b6316 (patch) | |
| tree | 9d90112ec5f380560d9cc44db1503c0083d6f996 /src/interop_subtitle_asset.cc | |
| parent | 5da3dca64c9d0398a5507688a230f4a9bf7dc9cb (diff) | |
Basic reading of Interop/SMPTE image subtitles with a test for Interop.
Diffstat (limited to 'src/interop_subtitle_asset.cc')
| -rw-r--r-- | src/interop_subtitle_asset.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index 1cd99563..e2873fb6 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -80,7 +80,12 @@ InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file) } } - /* XXX: now find SubtitleImages in _subtitles and load their PNG */ + BOOST_FOREACH (shared_ptr<Subtitle> i, _subtitles) { + shared_ptr<SubtitleImage> si = dynamic_pointer_cast<SubtitleImage>(i); + if (si) { + si->set_png_image (Data (file.parent_path() / String::compose("%1.png", si->id()))); + } + } } InteropSubtitleAsset::InteropSubtitleAsset () |
