summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-16 23:32:14 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-17 02:08:58 +0200
commit4d8bd60ac68df7ba9ad950b26043d377254952bb (patch)
tree33015d57141ef16572ac51e544fa06396b14e943 /libavcodec
parentcaa41d1e4c9678286699428aa461b210f05da5c9 (diff)
lavc/vc1: Set color_range for gray decoding.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 86e214a78a..ad1d4d9fb1 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -429,8 +429,11 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
return -1;
if (!(avctx->flags & CODEC_FLAG_GRAY))
avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
- else
+ else {
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+ if (avctx->color_range == AVCOL_RANGE_UNSPECIFIED)
+ avctx->color_range = AVCOL_RANGE_MPEG;
+ }
v->s.avctx = avctx;
if ((ret = ff_vc1_init_common(v)) < 0)