summaryrefslogtreecommitdiff
path: root/src/lib/decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-01 12:12:28 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-01 12:12:28 +0000
commit91dc3be38751f82f850ef0f66c4a48d9cc3fbffa (patch)
tree61fdac4f01b6514bb36727da0524b01e8102918f /src/lib/decoder.cc
parent1a97e283e790e6f4966a32d4332bbc8c787222d9 (diff)
Don't fail if we need to insert stuff right at the beginning of the decode.
Diffstat (limited to 'src/lib/decoder.cc')
-rw-r--r--src/lib/decoder.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index e154aac5d..6f5d63358 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -320,7 +320,11 @@ Decoder::process_video (AVFrame* frame)
void
Decoder::repeat_last_video ()
{
- assert (_last_image);
+ if (!_last_image) {
+ _last_image.reset (new CompactImage (pixel_format(), native_size()));
+ _last_image->make_black ();
+ }
+
Video (_last_image, _video_frame_index, _last_subtitle);
++_video_frame_index;
}