Merge master.
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 9889d511cd45016c97b08746bce15856a953e265..d3e0fa7b25687010a18cc2797db9aa9a76df3483 100644 (file)
@@ -33,6 +33,7 @@ extern "C" {
 #include "film.h"
 #include "log.h"
 #include "exceptions.h"
+#include "frame_rate_change.h"
 
 #include "i18n.h"
 
@@ -399,6 +400,9 @@ bool
 FFmpegContent::has_subtitle_during (ContentTimePeriod period) const
 {
        shared_ptr<FFmpegSubtitleStream> stream = subtitle_stream ();
+       if (!stream) {
+               return false;
+       }
 
        /* XXX: inefficient */
        for (vector<ContentTimePeriod>::const_iterator i = stream->periods.begin(); i != stream->periods.end(); ++i) {