From 8c02adc62d71dfbb079a04753d8c16152c49de88 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 May 2014 22:14:21 +0200 Subject: lavu: add all color-related enums to AVFrame Signed-off-by: Anton Khirnov --- libavutil/frame.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libavutil/frame.c') diff --git a/libavutil/frame.c b/libavutil/frame.c index 90485523e4..9539d90c5a 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -38,6 +38,13 @@ static void get_frame_defaults(AVFrame *frame) frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; +#if FF_API_AVFRAME_COLORSPACE + frame->color_primaries = AVCOL_PRI_UNSPECIFIED; + frame->color_trc = AVCOL_TRC_UNSPECIFIED; + frame->colorspace = AVCOL_SPC_UNSPECIFIED; + frame->color_range = AVCOL_RANGE_UNSPECIFIED; + frame->chroma_location = AVCHROMA_LOC_UNSPECIFIED; +#endif } AVFrame *av_frame_alloc(void) @@ -373,6 +380,13 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src) dst->coded_picture_number = src->coded_picture_number; dst->display_picture_number = src->display_picture_number; dst->flags = src->flags; +#if FF_API_AVFRAME_COLORSPACE + dst->color_primaries = src->color_primaries; + dst->color_trc = src->color_trc; + dst->colorspace = src->colorspace; + dst->color_range = src->color_range; + dst->chroma_location = src->chroma_location; +#endif memcpy(dst->error, src->error, sizeof(dst->error)); -- cgit v1.2.1