summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/screenshot.c7
-rw-r--r--video/out/vo.h2
2 files changed, 6 insertions, 3 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);
diff --git a/video/out/vo.h b/video/out/vo.h
index a2073944b3..0f01a4b056 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -179,7 +179,7 @@ struct voctrl_performance_data {
};
struct voctrl_screenshot {
- bool scaled, subs, osd, high_bit_depth;
+ bool scaled, subs, osd, high_bit_depth, native_csp;
struct mp_image *res;
};