Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-01 15:06:21 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-06-01 15:18:32 +0400
commit6e8e9f1e517ee52fe439f3e8ca762f09d235f21e (patch)
treeffd2f6414002eb7ba196046b78667b5b30676585 /libavutil/frame.c
parentec1ed6450620f01197920f1083b285e5c8355377 (diff)
parent8c02adc62d71dfbb079a04753d8c16152c49de88 (diff)
Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'
* commit '8c02adc62d71dfbb079a04753d8c16152c49de88': lavu: add all color-related enums to AVFrame Conflicts: libavcodec/avcodec.h libavutil/frame.c libavutil/frame.h libavutil/version.h The version check is changed so they are available with the current ABI FFmpeg libs should have no problems with added fields, nor should any application using the libs, and we regularly added fields in the past. We also moved 2 of these fields to AVFrame already previously without issues. See: a80e622924c89df69fb1c225ba432fe12fe6648e Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r--libavutil/frame.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 89557ed164..b6b755f5dd 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -103,8 +103,14 @@ static void get_frame_defaults(AVFrame *frame)
frame->key_frame = 1;
frame->sample_aspect_ratio = (AVRational){ 0, 1 };
frame->format = -1; /* unknown */
- frame->colorspace = AVCOL_SPC_UNSPECIFIED;
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)
@@ -469,8 +475,13 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
dst->display_picture_number = src->display_picture_number;
dst->flags = src->flags;
dst->decode_error_flags = src->decode_error_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
av_dict_copy(&dst->metadata, src->metadata, 0);