aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJai Menon <jmenon86@gmail.com>2009-11-10 14:48:32 +0000
committerJai Menon <jmenon86@gmail.com>2009-11-10 14:48:32 +0000
commit09bad7e3ca6baface20ad4d67bd5b99cd79694b1 (patch)
tree8d7a4dd1ffb4ad8ecdd497eb9429e981c1ccdf59 /libavcodec
parentb70b158833707d8f6f7b7aa5a5d9863c300ca932 (diff)
downloadffmpeg-09bad7e3ca6baface20ad4d67bd5b99cd79694b1.tar.gz
Handle JPEG2000 frames stored in the Quicktime container.
Fixes issue 1525. Originally committed as revision 20500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libopenjpeg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libopenjpeg.c b/libavcodec/libopenjpeg.c
index 3a3a127327..f1e047437c 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);
}