diff options
author | wm4 <nfxjfg@googlemail.com> | 2014-05-30 22:14:22 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-06-01 08:23:05 +0200 |
commit | eb800f120d2d42590fde2302fe828c847e41e773 (patch) | |
tree | 2ad3873dff1b77e1b6ef2fe255e4a6c6650f6139 | |
parent | 8c02adc62d71dfbb079a04753d8c16152c49de88 (diff) | |
download | ffmpeg-streaming-eb800f120d2d42590fde2302fe828c847e41e773.zip ffmpeg-streaming-eb800f120d2d42590fde2302fe828c847e41e773.tar.gz |
libavcodec: set AVFrame colorspace fields on decoding
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavcodec/utils.c | 7 |
1 files changed, 7 insertions, 0 deletions
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) { |