avcodec/mpeg12dec: Fix "-flags +gray"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
876c89a88f
commit
33529104e5
@ -1235,6 +1235,9 @@ static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
|
||||
MpegEncContext *s = &s1->mpeg_enc_ctx;
|
||||
const enum AVPixelFormat *pix_fmts;
|
||||
|
||||
if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY))
|
||||
return AV_PIX_FMT_GRAY8;
|
||||
|
||||
if (s->chroma_format < 2)
|
||||
pix_fmts = avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ?
|
||||
mpeg1_hwaccel_pixfmt_list_420 :
|
||||
|
Loading…
x
Reference in New Issue
Block a user