[SCM] libav/experimental: Handle JPEG2000 frames stored in the Quicktime container. Fixes issue 1525.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:54:20 UTC 2013


The following commit has been merged in the experimental branch:
commit 09bad7e3ca6baface20ad4d67bd5b99cd79694b1
Author: Jai Menon <jmenon86 at gmail.com>
Date:   Tue Nov 10 14:48:32 2009 +0000

    Handle JPEG2000 frames stored in the Quicktime container.
    Fixes issue 1525.
    
    Originally committed as revision 20500 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/libopenjpeg.c b/libavcodec/libopenjpeg.c
index 3a3a127..f1e0474 100644
--- a/libavcodec/libopenjpeg.c
+++ b/libavcodec/libopenjpeg.c
@@ -80,6 +80,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
        (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);
     }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list