lavc/h263: Set color_range for gray decoding.
This commit is contained in:
parent
4d8bd60ac6
commit
101f26e758
@ -48,8 +48,11 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx)
|
|||||||
if (avctx->codec->id == AV_CODEC_ID_MSS2)
|
if (avctx->codec->id == AV_CODEC_ID_MSS2)
|
||||||
return AV_PIX_FMT_YUV420P;
|
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 AV_PIX_FMT_GRAY8;
|
||||||
|
}
|
||||||
|
|
||||||
return avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
|
return avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user