swaroop: basics of encrypted MP4 playback.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 0e65a6d6b272a67e2f9bdc37bb281f8114684d87..c52723da3edb051ff09d042df9b80c500abce919 100644 (file)
@@ -59,7 +59,6 @@ extern "C" {
 
 #include "i18n.h"
 
-
 using std::cout;
 using std::string;
 using std::vector;
@@ -159,6 +158,12 @@ FFmpegDecoder::flush ()
 bool
 FFmpegDecoder::pass ()
 {
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+       if (_ffmpeg_content->encrypted() && !_ffmpeg_content->kdm()) {
+               return true;
+       }
+#endif
+
        int r = av_read_frame (_format_context, &_packet);
 
        /* AVERROR_INVALIDDATA can apparently be returned sometimes even when av_read_frame