diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-17 12:56:20 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-08-17 12:56:20 +0200 |
| commit | e65d17fa04c411295496968f6ecee9b3a6c21fae (patch) | |
| tree | c763a48ebd57268a1b83f9767fada295a30a219d /src/lib/image.cc | |
| parent | 0b4bffff846efe967110477797218c170ffb3166 (diff) | |
| parent | e96f917d51f9606a550902dbc16e0971a8967039 (diff) | |
Merge remote-tracking branch 'origin/main' into v2.17.x
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 6 |
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]; } |
