summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-07-01 00:38:13 +0100
committerCarl Hetherington <cth@carlh.net>2015-07-01 00:38:13 +0100
commitf763226773187b81651d7b03324b5ae521116a87 (patch)
treebaa239ed0e6b460968293c8d78c97fe2f65524fd /src
parentf2577fdda97dfc31177cc141f03dbcda970d9bc4 (diff)
Improve speed when encoding lots of identical frames when the same subtitles.
Diffstat (limited to 'src')
-rw-r--r--src/lib/position_image.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/position_image.cc b/src/lib/position_image.cc
index 44c1262b3..47e8f1a98 100644
--- a/src/lib/position_image.cc
+++ b/src/lib/position_image.cc
@@ -25,11 +25,12 @@ using std::cout;
bool
PositionImage::same (PositionImage const & other) const
{
- if (image != other.image || position != other.position) {
+ if ((!image && other.image) || (image && !other.image) || position != other.position) {
return false;
}
if (!image) {
+ /* Neither has image and the positions are the same */
return true;
}