On 26/09/14 18:22, Vittorio Giovara wrote:
--- libavcodec/utils.c | 5 +++++ 1 file changed, 5 insertions(+)diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 0c36548..7fce674 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1153,6 +1153,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++)
Ok. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
