summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-20 22:41:31 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-20 22:41:31 +0100
commitc7ba9145f246a66eac7d2d46da56b2f7f10bcc37 (patch)
tree6ed5d80ea98d89c0df4f87cec4689806adc586c0 /src/lib/encoder.cc
parent609c627559009eb920738915820caa014287a77c (diff)
Fix crash when no video is being encoded.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index fbc5c3561..6a604ab51 100644
--- 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 ());
}