Fix find missing function for DCP content (#646).
authorCarl Hetherington <cth@carlh.net>
Wed, 29 Jul 2015 20:00:14 +0000 (21:00 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 29 Jul 2015 20:00:14 +0000 (21:00 +0100)
ChangeLog
src/wx/content_menu.cc

index 6628ef45461a09cb42463aeb1be850dc3d8d1107..61fcd587187aa34d6debd6bf9adeddf0ad0c56e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-07-29  Carl Hetherington  <cth@carlh.net>
+
+       * Fix "find missing" with DCP folders (#646).
+
+       * Fix garbled audio from DCP sources when running
+       on Windows.
+
 2015-07-28  c.hetherington  <cth@carlh.net>
 
        * Stop forward-frame button going off the end of the film.
index 415039cb1bbc48b68134ecc3ca47b2f3a70c5386..159239345296dd8bad7cbac4e48509ffbcbb8381 100644 (file)
@@ -234,22 +234,27 @@ ContentMenu::find_missing ()
 
        /* XXX: a bit nasty */
        shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (_content.front ());
-       if (ic && !ic->still ()) {
+       shared_ptr<DCPContent> dc = dynamic_pointer_cast<DCPContent> (_content.front ());
+
+       int r = wxID_CANCEL;
+       boost::filesystem::path path;
+
+       if ((ic && !ic->still ()) || dc) {
                wxDirDialog* d = new wxDirDialog (0, _("Choose a folder"), wxT (""), wxDD_DIR_MUST_EXIST);
-               int const r = d->ShowModal ();
-               if (r == wxID_OK) {
-                       content.reset (new ImageContent (film, boost::filesystem::path (wx_to_std (d->GetPath ()))));
-               }
+               r = d->ShowModal ();
+               path = wx_to_std (d->GetPath ());
                d->Destroy ();
        } else {
                wxFileDialog* d = new wxFileDialog (0, _("Choose a file"), wxT (""), wxT (""), wxT ("*.*"), wxFD_MULTIPLE);
-               int const r = d->ShowModal ();
-               if (r == wxID_OK) {
-                       content = content_factory (film, wx_to_std (d->GetPath ()));
-               }
+               r = d->ShowModal ();
+               path = wx_to_std (d->GetPath ());
                d->Destroy ();
        }
 
+       if (r == wxID_OK) {
+               content = content_factory (film, path);
+       }
+
        if (!content) {
                return;
        }