1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

Supoort decoding of gray16 images with libopenjpeg.

This commit is contained in:
Michael Bradshaw 2012-01-30 23:53:25 +01:00 committed by Carl Eugen Hoyos
parent 6a3cc21242
commit f0d6828dbe

View File

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