changeset 10508:f33404f82b9e libavcodec

Handle JPEG2000 frames stored in the Quicktime container. Fixes issue 1525.
author jai_menon
date Tue, 10 Nov 2009 14:48:32 +0000
parents ca71c924b65f
children cdf5b1ed3500
files libopenjpeg.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libopenjpeg.c	Tue Nov 10 14:37:42 2009 +0000
+++ b/libopenjpeg.c	Tue Nov 10 14:48:32 2009 +0000
@@ -80,6 +80,10 @@
        (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);
     }