Working decryption via KDM.
[libdcp.git] / test / rewrite_subs.cc
index adb9f6b4da5b29083a4123cf50020124c22cdd2d..c7f8bfbdfa22944f0e24448841ab05e80d5ecea7 100644 (file)
@@ -3,6 +3,7 @@
 #include "cpl.h"
 #include "reel.h"
 #include "subtitle_asset.h"
+#include "exceptions.h"
 
 using std::cout;
 using std::cerr;
@@ -22,11 +23,11 @@ try
        DCP* dcp = new DCP (argv[1]);
        dcp->read (false);
        
-       list<shared_ptr<const CPL> > cpls = dcp->cpls ();
-       for (list<boost::shared_ptr<const CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
+       list<shared_ptr<CPL> > cpls = dcp->cpls ();
+       for (list<boost::shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
 
-               list<shared_ptr<const Reel> > reels = (*i)->reels ();
-               for (list<shared_ptr<const Reel> >::iterator j = reels.begin(); j != reels.end(); ++j) {
+               list<shared_ptr<Reel> > reels = (*i)->reels ();
+               for (list<shared_ptr<Reel> >::iterator j = reels.begin(); j != reels.end(); ++j) {
 
                        if ((*j)->main_subtitle()) {
                                (*j)->main_subtitle()->write_xml ();