summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-12-12 00:40:19 +0000
committerCarl Hetherington <cth@carlh.net>2018-12-12 00:40:19 +0000
commit5ab24a511575f1887331f24fd0911c614df3c3c0 (patch)
tree01a83c152587aa95d4eba54bbf976384318bb39f
parent3c414bf90d4cfcfe342c0b057b5134f72485fe32 (diff)
Fix bad rendering of AV_PIX_FMT_PAL8 (palette-ised) images (#1426).v2.13.83
-rw-r--r--src/lib/image.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index dffc00e0e..41582f307 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -106,6 +106,10 @@ Image::planes () const
throw PixelFormatError ("planes()", _pixel_format);
}
+ if (_pixel_format == AV_PIX_FMT_PAL8) {
+ return 2;
+ }
+
if ((d->flags & AV_PIX_FMT_FLAG_PLANAR) == 0) {
return 1;
}