summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-31 17:21:35 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-31 17:21:35 +0100
commitf45cbb73068321d857249aaa21f770b87493c7c2 (patch)
tree9e98c39274a47c0906a79dbb18f067fc9963fb62 /src/lib/video_decoder.cc
parentf385ef03e5ea27519a31c0839447735a7fba0602 (diff)
Test filling of stuff with black.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index cba21d280..086a6b552 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -112,3 +112,12 @@ VideoDecoder::subtitle (shared_ptr<TimedSubtitle> s)
_timed_subtitle->subtitle()->set_position (Position (p.x - _video_content->crop().left, p.y - _video_content->crop().top));
}
}
+
+bool
+VideoDecoder::video_done () const
+{
+ shared_ptr<const Film> film = _film.lock ();
+ assert (film);
+
+ return (_video_content->length() - _next_video) < film->video_frames_to_time (1);
+}