[FFmpeg-devel] [PATCH] lcldec: fix decoding of uncompressed rgb24 sample

Paul B Mahol onemda at gmail.com
Fri Nov 2 22:51:38 CET 2012


Sample from ticket #1216 does not use any compression but bitstream
claims it is. Reference decoder decodes sample just fine.

Fixes #1216.

Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/lcldec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index b3b7b52..66db7c7 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -198,7 +198,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
     case AV_CODEC_ID_MSZH:
         switch (c->compression) {
         case COMP_MSZH:
-            if (c->flags & FLAG_MULTITHREAD) {
+            if (c->imgtype == IMGTYPE_RGB24 && len == width * height * 3) {
+                ;
+            } else if (c->flags & FLAG_MULTITHREAD) {
                 mthread_inlen = AV_RL32(encoded);
                 mthread_inlen = FFMIN(mthread_inlen, len - 8);
                 mthread_outlen = AV_RL32(encoded+4);
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list