summaryrefslogtreecommitdiff
path: root/src/lib/image.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-17 12:56:20 +0200
committerCarl Hetherington <cth@carlh.net>2024-08-17 12:56:20 +0200
commite65d17fa04c411295496968f6ecee9b3a6c21fae (patch)
treec763a48ebd57268a1b83f9767fada295a30a219d /src/lib/image.cc
parent0b4bffff846efe967110477797218c170ffb3166 (diff)
parente96f917d51f9606a550902dbc16e0971a8967039 (diff)
Merge remote-tracking branch 'origin/main' into v2.17.x
Diffstat (limited to 'src/lib/image.cc')
-rw-r--r--src/lib/image.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index 2167918f8..7181c4546 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -1171,14 +1171,14 @@ Image::write_to_socket (shared_ptr<Socket> socket) const
float
-Image::bytes_per_pixel (int c) const
+Image::bytes_per_pixel(int component) const
{
auto d = av_pix_fmt_desc_get(_pixel_format);
if (!d) {
throw PixelFormatError ("bytes_per_pixel()", _pixel_format);
}
- if (c >= planes()) {
+ if (component >= planes()) {
return 0;
}
@@ -1213,7 +1213,7 @@ Image::bytes_per_pixel (int c) const
return bpp[0] + bpp[1] + bpp[2] + bpp[3];
}
- return bpp[c];
+ return bpp[component];
}