From 67775a6d0d28131b98ae284c7be23d79ccdab685 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Apr 2020 23:11:08 +0200 Subject: 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. --- src/lib/empty.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/empty.h') 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 film, std::list > pieces, boost::function)> part); + Empty (boost::shared_ptr film, boost::shared_ptr playlist, boost::function)> 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 _periods; -- cgit v1.2.3