[libav-stable] png: Set the color range as full range

wm4 git at libav.org
Sun May 10 17:02:49 CEST 2015


Module: libav
Branch: master
Commit: b9f7a677083647d85e583d6d7384938766a293d7

Author:    wm4 <nfxjfg at googlemail.com>
Committer: Luca Barbato <lu_zero at gentoo.org>
Date:      Fri May  8 17:01:50 2015 +0200

png: Set the color range as full range

The format uses full range for the gray formats.

CC: libav-stable at libav.org

---

 libavcodec/pngdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index c8bfa36..823d77f 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -646,6 +646,8 @@ static av_cold int png_dec_init(AVCodecContext *avctx)
 {
     PNGDecContext *s = avctx->priv_data;
 
+    avctx->color_range = AVCOL_RANGE_JPEG;
+
     s->prev = av_frame_alloc();
     if (!s->prev)
         return AVERROR(ENOMEM);



More information about the libav-stable mailing list