aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-08 22:06:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-08 22:08:11 +0200
commit10dd62737e1a12b6bb1d3e732ab905f48552543e (patch)
tree12e5416c1d3a55deee674cb68310bedfb6bd4a7c
parentd5a3caef93026abebaa73f4b9c747004a1457fd7 (diff)
parent147f2e91eece6b9021ff5b7f8a3b5ce053566659 (diff)
downloadffmpeg-10dd62737e1a12b6bb1d3e732ab905f48552543e.tar.gz
Merge commit '147f2e91eece6b9021ff5b7f8a3b5ce053566659'
* commit '147f2e91eece6b9021ff5b7f8a3b5ce053566659': avcodec: make sure color_range is properly initialized Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 7ceb2daa83..367e1e580e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1530,6 +1530,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
ret = AVERROR(EINVAL);
goto free_and_end;
}
+ if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ420P ||
+ avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ422P ||
+ avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ440P ||
+ avctx->codec->pix_fmts[i] == AV_PIX_FMT_YUVJ444P)
+ avctx->color_range = AVCOL_RANGE_JPEG;
}
if (avctx->codec->supported_samplerates) {
for (i = 0; avctx->codec->supported_samplerates[i] != 0; i++)