projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crash when no video is being encoded.
[dcpomatic.git]
/
src
/
lib
/
encoder.cc
diff --git
a/src/lib/encoder.cc
b/src/lib/encoder.cc
index fbc5c3561114f58de84da9781606e130d9fd8c73..6a604ab5174f24c71d2dbf88196b2204df81be70 100644
(file)
--- a/
src/lib/encoder.cc
+++ b/
src/lib/encoder.cc
@@
-166,6
+166,10
@@
Encoder::current_encoding_rate () const
int
Encoder::video_frames_enqueued () const
{
+ if (!_last_player_video) {
+ return 0;
+ }
+
return _last_player_video->time().frames_floor (_film->video_frame_rate ());
}