[FFmpeg-cvslog] lavc/vc1: Set color_range for gray decoding.

Carl Eugen Hoyos git at videolan.org
Sun May 17 03:05:03 CEST 2015


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat May 16 23:32:14 2015 +0200| [4d8bd60ac68df7ba9ad950b26043d377254952bb] | committer: Carl Eugen Hoyos

lavc/vc1: Set color_range for gray decoding.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d8bd60ac68df7ba9ad950b26043d377254952bb
---

 libavcodec/vc1dec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 86e214a..ad1d4d9 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)



More information about the ffmpeg-cvslog mailing list