diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-16 23:32:27 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-05-17 02:08:58 +0200 |
commit | 101f26e758001dac564a8f1726c74cdde75ed8d1 (patch) | |
tree | 200652b3f955d1017fae04242a953ee7314b43db /libavcodec/h263dec.c | |
parent | 4d8bd60ac68df7ba9ad950b26043d377254952bb (diff) | |
download | ffmpeg-101f26e758001dac564a8f1726c74cdde75ed8d1.tar.gz |
lavc/h263: Set color_range for gray decoding.
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index c47f5b160f..3e115eb60c 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -48,8 +48,11 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx) if (avctx->codec->id == AV_CODEC_ID_MSS2) return AV_PIX_FMT_YUV420P; - if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY)) + if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY)) { + if (avctx->color_range == AVCOL_RANGE_UNSPECIFIED) + avctx->color_range = AVCOL_RANGE_MPEG; return AV_PIX_FMT_GRAY8; + } return avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts); } |