summaryrefslogtreecommitdiff
path: root/src/lib/empty.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-14 23:11:08 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-14 23:11:08 +0200
commit67775a6d0d28131b98ae284c7be23d79ccdab685 (patch)
tree6ba20512690d66685600a0fd7d6850ad03ba784b /src/lib/empty.h
parent4ab86ef0295bcd6bb9297996a06006f371d22bae (diff)
Fix Empty/Player behaviour when using a playlist that is not the same as the Film's.
Previously Empty would use the length of the film for its end point. Now it takes a Playlist (rather than a list of Pieces) and uses the length of that playlist for its end point. This fixes #1543, in which single-content audio analysis jobs would run for the whole length of the film, rather than the length of the content, producing strange graphs and incorrect progress reports.
Diffstat (limited to 'src/lib/empty.h')
-rw-r--r--src/lib/empty.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/empty.h b/src/lib/empty.h
index bd295206e..abd6fdef0 100644
--- a/src/lib/empty.h
+++ b/src/lib/empty.h
@@ -28,14 +28,14 @@
struct empty_test1;
struct empty_test2;
+struct empty_test3;
struct player_subframe_test;
-class Piece;
class Empty
{
public:
Empty () {}
- Empty (boost::shared_ptr<const Film> film, std::list<boost::shared_ptr<Piece> > pieces, boost::function<bool (boost::shared_ptr<Piece>)> part);
+ Empty (boost::shared_ptr<const Film> film, boost::shared_ptr<const Playlist> playlist, boost::function<bool (boost::shared_ptr<const Content>)> part);
dcpomatic::DCPTime position () const {
return _position;
@@ -50,6 +50,7 @@ public:
private:
friend struct ::empty_test1;
friend struct ::empty_test2;
+ friend struct ::empty_test3;
friend struct ::player_subframe_test;
std::list<dcpomatic::DCPTimePeriod> _periods;