summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-08 23:10:01 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-08 23:10:01 +0100
commit50e6acde52c7eaa3afa239bc14f08eced3787bd9 (patch)
treee1e59f2759605976f20477942070b4e302187425 /src
parent4453965c2ab322122ffa5b51a9fc6efc0f896425 (diff)
Somewhat hacky fix to crashes in A/B with some filters.
Diffstat (limited to 'src')
-rw-r--r--src/lib/combiner.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/combiner.cc b/src/lib/combiner.cc
index 367cefa7f..f7d634832 100644
--- a/src/lib/combiner.cc
+++ b/src/lib/combiner.cc
@@ -45,6 +45,14 @@ Combiner::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subtitl
void
Combiner::process_video_b (shared_ptr<const Image> image, bool, shared_ptr<Subtitle> sub, double t)
{
+ if (!_image) {
+ /* It's possible for filters in the A-side to mean that we get a B frame
+ before any A; just skip the B frame in that case. This at least prevents
+ a crash, but may not be right.
+ */
+ return;
+ }
+
/* Copy the right half of this image into our _image */
/* XXX: this should probably be in the Image class */
for (int i = 0; i < image->components(); ++i) {