diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-11-01 12:12:28 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-11-01 12:12:28 +0000 |
| commit | 91dc3be38751f82f850ef0f66c4a48d9cc3fbffa (patch) | |
| tree | 61fdac4f01b6514bb36727da0524b01e8102918f /src/lib/decoder.cc | |
| parent | 1a97e283e790e6f4966a32d4332bbc8c787222d9 (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.cc | 6 |
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; } |
