Fix display when there is no film.
[dcpomatic.git] / src / lib / dcp_decoder.cc
index 826b4e8d387ba44d709cb77bff36fe40bda318c5..a3c42a321a70d824ca8d6a84497dfcec804595c9 100644 (file)
@@ -125,7 +125,14 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
 bool
 DCPDecoder::pass ()
 {
-       if (_reel == _reels.end () || !_dcp_content->can_be_played ()) {
+       if (!_dcp_content->can_be_played()) {
+               return true;
+       }
+
+       if (_reel == _reels.end()) {
+               if (audio) {
+                       audio->flush ();
+               }
                return true;
        }