summaryrefslogtreecommitdiffstats
path: root/player/screenshot.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2022-12-12 22:29:25 +0100
committerNiklas Haas <github-daiK1o@haasn.dev>2023-02-13 21:53:41 +0100
commitc9758885849420f267e156c36ba0939a8b0c66d7 (patch)
treec14aad840e293c7b78b3fc9545df3eb659e18740 /player/screenshot.c
parentff2602449674eea222cc99294e66802a19d97cdd (diff)
downloadmpv-c9758885849420f267e156c36ba0939a8b0c66d7.tar.bz2
mpv-c9758885849420f267e156c36ba0939a8b0c66d7.tar.xz
player/screenshot: pass on ability to output native CSP
Fixes: #10988
Diffstat (limited to 'player/screenshot.c')
-rw-r--r--player/screenshot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/player/screenshot.c b/player/screenshot.c
index 99b38a544d..6bf12f4bd1 100644
--- a/player/screenshot.c
+++ b/player/screenshot.c
@@ -19,6 +19,8 @@
#include <string.h>
#include <time.h>
+#include <libavcodec/avcodec.h>
+
#include "config.h"
#include "osdep/io.h"
@@ -332,6 +334,7 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode,
bool high_depth)
{
struct mp_image *image = NULL;
+ const struct image_writer_opts *imgopts = mpctx->opts->screenshot_image_opts;
if (mode == MODE_SUBTITLES && osd_get_render_subs_in_filter(mpctx->osd))
mode = 0;
bool need_add_subs = mode == MODE_SUBTITLES;
@@ -343,8 +346,8 @@ static struct mp_image *screenshot_get(struct MPContext *mpctx, int mode,
.scaled = mode == MODE_FULL_WINDOW,
.subs = mode != 0,
.osd = mode == MODE_FULL_WINDOW,
- .high_bit_depth = high_depth &&
- mpctx->opts->screenshot_image_opts->high_bit_depth,
+ .high_bit_depth = high_depth && imgopts->high_bit_depth,
+ .native_csp = image_writer_flexible_csp(imgopts),
};
if (!mpctx->opts->screenshot_sw)
vo_control(mpctx->video_out, VOCTRL_SCREENSHOT, &ctrl);