diff options
author | Leo Izen <leo.izen@gmail.com> | 2022-04-28 23:59:45 -0400 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2022-04-29 01:05:52 -0400 |
commit | 9ffaa6b81bb78d9813b2f10ea56e51b700660e2d (patch) | |
tree | bdde52bc6d756a924ba85551283b5c3bd145c45d /video/image_writer.c | |
parent | aa1158569ca90be850e206fadb222a8c4503278d (diff) | |
download | mpv-9ffaa6b81bb78d9813b2f10ea56e51b700660e2d.tar.bz2 mpv-9ffaa6b81bb78d9813b2f10ea56e51b700660e2d.tar.xz |
video/image_writer: fix high-depth JPEG XL screenshots
Allow screenshot-high-bit-depth=yes to work with JPEG XL
screenshots when screenshot-sw=no is set. They already work
as expected when screenshot-sw=yes is set, but this allows
the hardware screenshots to work this way too.
Diffstat (limited to 'video/image_writer.c')
-rw-r--r-- | video/image_writer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/image_writer.c b/video/image_writer.c index b7a777ec22..6519d27451 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -323,7 +323,11 @@ const char *image_writer_file_ext(const struct image_writer_opts *opts) bool image_writer_high_depth(const struct image_writer_opts *opts) { - return opts->format == AV_CODEC_ID_PNG; + return opts->format == AV_CODEC_ID_PNG +#if HAVE_JPEGXL + || opts->format == AV_CODEC_ID_JPEGXL +#endif + ; } int image_writer_format_from_ext(const char *ext) |