Fix memory leak which also causes strange flickering in the audio
[dcpomatic.git] / src / wx / film_editor.h
index 48e944fc6a7c020643d568bc76f8745f11dbe435..84a1d361b7e3af37afec1085930a7e5b5156fdd6 100644 (file)
  */
 
 #include "lib/film.h"
+#include "lib/warnings.h"
+DCPOMATIC_DISABLE_WARNINGS
 #include <wx/wx.h>
+DCPOMATIC_ENABLE_WARNINGS
 #include <boost/signals2.hpp>
 
 class wxNotebook;
 class Film;
 class ContentPanel;
 class DCPPanel;
-class ControlFilmViewer;
+class FilmViewer;
 
 /** @class FilmEditor
  *  @brief A wx widget to edit a film's metadata, and perform various functions.
@@ -38,7 +41,7 @@ class ControlFilmViewer;
 class FilmEditor : public wxPanel
 {
 public:
-       FilmEditor (wxWindow *, ControlFilmViewer* viewer);
+       FilmEditor (wxWindow *, boost::weak_ptr<FilmViewer> viewer);
 
        void set_film (boost::shared_ptr<Film>);