From 09a95eca971ddd2ea75cd615e7ef2b997d52b690 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 31 Oct 2012 11:46:05 +0000 Subject: Try a different approach to frame duplication in the decoder. --- src/lib/decoder.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/lib/decoder.cc') diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc index abb4d13a1..e154aac5d 100644 --- a/src/lib/decoder.cc +++ b/src/lib/decoder.cc @@ -310,11 +310,21 @@ Decoder::process_video (AVFrame* frame) } TIMING ("Decoder emits %1", _video_frame_index); - Video ((*i), _video_frame_index, sub); + Video (*i, _video_frame_index, sub); ++_video_frame_index; + _last_image = *i; + _last_subtitle = sub; } } +void +Decoder::repeat_last_video () +{ + assert (_last_image); + Video (_last_image, _video_frame_index, _last_subtitle); + ++_video_frame_index; +} + void Decoder::process_subtitle (shared_ptr s) { -- cgit v1.2.3