diff options
author | wm4 <nfxjfg@googlemail.com> | 2014-05-30 22:14:21 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-06-01 08:22:02 +0200 |
commit | 8c02adc62d71dfbb079a04753d8c16152c49de88 (patch) | |
tree | 666a2d9575899e5287766443f79a4711ca35a1df /libavutil/frame.c | |
parent | d2ef708c95ace2518deffe830a9c439aeb9edd5d (diff) | |
download | ffmpeg-8c02adc62d71dfbb079a04753d8c16152c49de88.tar.gz |
lavu: add all color-related enums to AVFrame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r-- | libavutil/frame.c | 14 |
1 files changed, 14 insertions, 0 deletions
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)); |