aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-09 15:58:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-09 15:58:02 +0200
commit33529104e56a0655b224d6082f885e6b828041ee (patch)
tree3c1c933926a092950f049af5175d0f809a2c3f10
parent876c89a88f6470b8d90b54f05a6add84e996cba3 (diff)
downloadffmpeg-33529104e56a0655b224d6082f885e6b828041ee.tar.gz
avcodec/mpeg12dec: Fix "-flags +gray"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 58505cedbb..ea7386cdf0 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -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 :