Commit 4ea5c438 authored by jai_menon's avatar jai_menon

Handle JPEG2000 frames stored in the Quicktime container.

Fixes issue 1525.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20500 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e623a644
...@@ -80,6 +80,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, ...@@ -80,6 +80,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx,
(AV_RB32(buf + 8) == JP2_SIG_VALUE)) { (AV_RB32(buf + 8) == JP2_SIG_VALUE)) {
dec = opj_create_decompress(CODEC_JP2); dec = opj_create_decompress(CODEC_JP2);
} else { } 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); dec = opj_create_decompress(CODEC_J2K);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment