Originally committed as revision 20500 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -80,6 +80,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, · 79 unmodified lines | ||
| 80 | 80 | (AV_RB32(buf + 8) == JP2_SIG_VALUE)) { |
| 81 | 81 | dec = opj_create_decompress(CODEC_JP2); |
| 82 | 82 | } else { |
| 83 | + // If the AVPacket contains a jp2c box, then skip to | |
| 84 | + // the starting byte of the codestream. | |
| 85 | + if (AV_RB32(buf + 4) == AV_RB32("jp2c")) | |
| 86 | + buf += 8; | |
| 83 | 87 | dec = opj_create_decompress(CODEC_J2K); |
| 84 | 88 | } |
| 85 | 89 | |