diff options
author | Michael Bradshaw <mbradshaw@sorensonmedia.com> | 2012-01-30 23:53:25 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-30 23:53:25 +0100 |
commit | f0d6828dbe308b277525d3df19c0014833be2271 (patch) | |
tree | 4f1fa1ebbadf4b8dcf909895d826d716df5871f4 /libavcodec/libopenjpegdec.c | |
parent | 6a3cc21242c1133671ee1e4eede9a97e0a6b3392 (diff) | |
download | ffmpeg-f0d6828dbe308b277525d3df19c0014833be2271.tar.gz |
Supoort decoding of gray16 images with libopenjpeg.
Diffstat (limited to 'libavcodec/libopenjpegdec.c')
-rw-r--r-- | libavcodec/libopenjpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index 07cca2547b..3139b85cf2 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -258,7 +258,7 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, avcodec_set_dimensions(avctx, width, height); switch (image->numcomps) { - case 1: avctx->pix_fmt = PIX_FMT_GRAY8; + case 1: avctx->pix_fmt = (image->comps[0].bpp == 8) ? PIX_FMT_GRAY8 : PIX_FMT_GRAY16; break; case 3: avctx->pix_fmt = check_image_attributes(avctx, image); break; |