Commit f0d6828d authored by Michael Bradshaw's avatar Michael Bradshaw Committed by Carl Eugen Hoyos

Supoort decoding of gray16 images with libopenjpeg.

parent 6a3cc212
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment