Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-09 02:10:25 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-09 02:13:55 +0300
commit9025bc588ad441b9b0eccd69aa91caf5d2ac49ac (patch)
tree451c86e46f4c814f9331ede9624e2f926e3c2553 /libavcodec/h263dec.c
parentd1d8ee5e9191dd3ba63532ea219cb916b4d64121 (diff)
avcodec/h263dec: use PIX_FMT_GRAY8 when the user specified CODEC_FLAG_GRAY
Fixes Ticket4542 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 7c87f78379..c47f5b160f 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -48,6 +48,9 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx)
if (avctx->codec->id == AV_CODEC_ID_MSS2)
return AV_PIX_FMT_YUV420P;
+ if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY))
+ return AV_PIX_FMT_GRAY8;
+
return avctx->pix_fmt = ff_get_format(avctx, avctx->codec->pix_fmts);
}