[FFmpeg-devel] [PATCH]Support j2k in mov

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jul 17 00:03:47 CEST 2013


Hi!

Attached patch fixes decoding of j2k in mov (like the sample from ticket 
#860), this is a regression in 2.0 as reported by Piotr.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index d9b9888..a46fded 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1429,6 +1429,8 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
         }
     } else {
         bytestream2_seek(&s->g, 0, SEEK_SET);
+        if (!jp2_find_codestream(s))
+            bytestream2_seek(&s->g, 0, SEEK_SET);
     }
 
     if (bytestream2_get_be16u(&s->g) != JPEG2000_SOC) {


More information about the ffmpeg-devel mailing list