projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
876c89a
)
avcodec/mpeg12dec: Fix "-flags +gray"
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 9 May 2015 13:58:02 +0000
(15:58 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 9 May 2015 13:58:02 +0000
(15:58 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg12dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpeg12dec.c
b/libavcodec/mpeg12dec.c
index
58505ce
..
ea7386c
100644
(file)
--- 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 :