From eb800f120d2d42590fde2302fe828c847e41e773 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 May 2014 22:14:22 +0200 Subject: [PATCH] libavcodec: set AVFrame colorspace fields on decoding Signed-off-by: Anton Khirnov --- libavcodec/utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index cb456d5..dff8419 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -580,6 +580,13 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) int size; AVFrameSideData *frame_sd; +#if FF_API_AVFRAME_COLORSPACE + frame->color_primaries = avctx->color_primaries; + frame->color_trc = avctx->color_trc; + frame->colorspace = avctx->colorspace; + frame->color_range = avctx->color_range; + frame->chroma_location = avctx->chroma_sample_location; +#endif frame->reordered_opaque = avctx->reordered_opaque; if (!pkt) { -- 2.7.4