[FFmpeg-devel] [PATCH] libopenjpegdec: hack to fix GRAY16 decoding

Paul B Mahol onemda at gmail.com
Mon Mar 26 01:31:31 CEST 2012


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/libopenjpegdec.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index 29724a2..f7dbefd 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -106,6 +106,10 @@ libopenjpeg_rgb:
 
 static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) {
     int i, component_plane;
+
+    if (pix_fmt == PIX_FMT_GRAY16)
+        return 0;
+
     component_plane = av_pix_fmt_descriptors[pix_fmt].comp[0].plane;
     for(i = 1; i < av_pix_fmt_descriptors[pix_fmt].nb_components; i++) {
         if (component_plane != av_pix_fmt_descriptors[pix_fmt].comp[i].plane)
-- 
1.7.7



More information about the ffmpeg-devel mailing list