mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
aa1158569c
commit
9ffaa6b81b
|
@ -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)
|
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)
|
int image_writer_format_from_ext(const char *ext)
|
||||||
|
|
Loading…
Reference in New Issue