1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-22 04:04:14 +02:00

avcodec/mpeg12dec: Fix "-flags +gray"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-05-09 15:58:02 +02:00
parent 876c89a88f
commit 33529104e5

View File

@ -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 :