[FFmpeg-cvslog] r20500 - trunk/libavcodec/libopenjpeg.c

jai_menon subversion
Tue Nov 10 15:48:32 CET 2009


Author: jai_menon
Date: Tue Nov 10 15:48:32 2009
New Revision: 20500

Log:
Handle JPEG2000 frames stored in the Quicktime container.
Fixes issue 1525.

Modified:
   trunk/libavcodec/libopenjpeg.c

Modified: trunk/libavcodec/libopenjpeg.c
==============================================================================
--- trunk/libavcodec/libopenjpeg.c	Tue Nov 10 15:37:42 2009	(r20499)
+++ trunk/libavcodec/libopenjpeg.c	Tue Nov 10 15:48:32 2009	(r20500)
@@ -80,6 +80,10 @@ static int libopenjpeg_decode_frame(AVCo
        (AV_RB32(buf + 8) == JP2_SIG_VALUE)) {
         dec = opj_create_decompress(CODEC_JP2);
     } else {
+        // If the AVPacket contains a jp2c box, then skip to
+        // the starting byte of the codestream.
+        if (AV_RB32(buf + 4) == AV_RB32("jp2c"))
+            buf += 8;
         dec = opj_create_decompress(CODEC_J2K);
     }
 



More information about the ffmpeg-cvslog mailing list