Display only required tabs, including subs / ccap.
[dcpomatic.git] / src / lib / dcp_content.cc
index e56ad9e21f7e7ccaa086ed646a962a38548e475f..414a2225605ea599b2e11072c20b409c23680666 100644 (file)
@@ -191,8 +191,10 @@ DCPContent::examine (shared_ptr<Job> job)
        {
                boost::mutex::scoped_lock lm (_mutex);
                _name = examiner->name ();
-               for (int i = 0; i < examiner->captions(); ++i) {
-                       caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this)));
+               for (int i = 0; i < CAPTION_COUNT; ++i) {
+                       if (examiner->has_caption(static_cast<CaptionType>(i))) {
+                               caption.push_back (shared_ptr<CaptionContent>(new CaptionContent(this, static_cast<CaptionType>(i))));
+                       }
                }
                captions = caption.size ();
                _encrypted = examiner->encrypted ();