Various fixes to FFmpeg decoder, including a couple of tests.
[dcpomatic.git] / src / lib / player.h
index be5cbddb4a15d051f6793ba4cbf0992d65248128..d83045ab12a6b8e84478be51188111240095f971 100644 (file)
@@ -131,6 +131,7 @@ private:
        VideoFrame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
        AudioFrame dcp_to_content_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
        ContentTime dcp_to_content_subtitle (boost::shared_ptr<const Piece> piece, DCPTime t) const;
+       boost::shared_ptr<DCPVideo> black_dcp_video (DCPTime) const;
 
        template<class C>
        std::list<boost::shared_ptr<Piece> >
@@ -138,7 +139,7 @@ private:
        {
                std::list<boost::shared_ptr<Piece> > overlaps;
                for (typename std::list<boost::shared_ptr<Piece> >::const_iterator i = _pieces.begin(); i != _pieces.end(); ++i) {
-                       if (boost::dynamic_pointer_cast<C> ((*i)->content) && (*i)->content->position() >= t && (*i)->content->end() < t) {
+                       if (boost::dynamic_pointer_cast<C> ((*i)->content) && (*i)->content->position() <= t && t < (*i)->content->end()) {
                                overlaps.push_back (*i);
                        }
                }