summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-02-28 01:39:31 +0100
committerNiklas Haas <git@nand.wakku.to>2015-02-28 01:39:31 +0100
commit653b0dd5295453d9661f673b4ebd02c5ceacf645 (patch)
tree469f28b70997ae072ed0426bd6246f24c9a42a1d /video
parent729c8b3f641e633474be612e66388c131a1b5c92 (diff)
downloadmpv-653b0dd5295453d9661f673b4ebd02c5ceacf645.tar.bz2
mpv-653b0dd5295453d9661f673b4ebd02c5ceacf645.tar.xz
screenshots: check for AVFrame csp support
Apparently, libav stable is old enough to not have these fields.
Diffstat (limited to 'video')
-rw-r--r--video/image_writer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index ab00b5bb01..700e1c4284 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -133,10 +133,12 @@ static int write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)
pic->format = avctx->pix_fmt;
pic->width = avctx->width;
pic->height = avctx->height;
+#if HAVE_AVFRAME_CSP
if (ctx->opts->tag_csp) {
pic->color_primaries = mp_csp_prim_to_avcol_pri(image->params.primaries);
pic->color_trc = mp_csp_trc_to_avcol_trc(image->params.gamma);
}
+#endif
int ret = avcodec_encode_video2(avctx, &pkt, pic, &got_output);
if (ret < 0)
goto error_exit;