summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-06 15:59:57 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-06 15:59:57 +0000
commit48073ddb0a9a6e9c9dd81b04b196230f4372447b (patch)
tree88276194523cd43f10642d729749200782aec64d /src/lib/video_decoder.cc
parentb0650516a8e16effeee8e07a8b14f505c888109c (diff)
Add some writer-loop debugging from 1.x; ignore out-of-order frames when they come from decoders; fix hang if there are unsequenced images in the writer queue when we want to stop.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index 1bb460da3..8e6f11709 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -21,7 +21,9 @@
#include "image.h"
#include "image_proxy.h"
#include "raw_image_proxy.h"
-#include "content_video.h"
+#include "raw_image_proxy.h"
+#include "film.h"
+#include "log.h"
#include "i18n.h"
@@ -280,6 +282,17 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, VideoFrame frame)
to = to_push.front().frame;
}
+ /* It has been known that this method receives frames out of order; at this
+ point I'm not sure why, but we'll just ignore them.
+ */
+
+ if (from && to && from.get() > to.get()) {
+ _video_content->film()->log()->log (
+ String::compose ("Ignoring out-of-order decoded frame %1 after %2", to.get(), from.get()), Log::TYPE_WARNING
+ );
+ return;
+ }
+
if (from) {
if (_video_content->video_frame_type() == VIDEO_FRAME_TYPE_2D) {
fill_2d (from.get(), to.get ());