From c7ba9145f246a66eac7d2d46da56b2f7f10bcc37 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 20 Jun 2016 22:41:31 +0100 Subject: [PATCH] Fix crash when no video is being encoded. --- src/lib/encoder.cc | 4 ++++ 1 file changed, 4 insertions(+) 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 ()); } -- 2.30.2