Fix up some bugs with subs.
authorCarl Hetherington <cth@carlh.net>
Mon, 13 Aug 2012 19:06:33 +0000 (20:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 13 Aug 2012 19:06:33 +0000 (20:06 +0100)
src/dcp.cc
src/dcp_time.cc

index 4112d3b627a7fc39a42d36306a7d83b1b62f5b0f..c0438ebde646b7f680e4d5b3638daf23ebf74ccf 100644 (file)
@@ -319,6 +319,11 @@ DCP::DCP (string directory)
                                                   )
                                           ));
        }
+
+       for (list<string>::iterator i = files.subtitles.begin(); i != files.subtitles.end(); ++i) {
+               string const l = i->substr (_directory.length ());
+               _assets.push_back (shared_ptr<SubtitleAsset> (new SubtitleAsset (_directory, l)));
+       }
 }
 
 
index 5b4241c4f42978d63a67579e7ac8ec618412428c..f853143a698a67e2f2e55d7c11775f581c182b1a 100644 (file)
@@ -25,6 +25,10 @@ using namespace std;
 using namespace libdcp;
 
 Time::Time (int frame, int frames_per_second)
+       : h (0)
+       , m (0)
+       , s (0)
+       , t (0)
 {
        float sec_float = float (frame) / frames_per_second;
        t = (int (sec_float * 1000) % 1000) / 4;