Browse Source

Detect and skip mj2-style jp2c header.

This this fixes one of the issues with
http://blogs.bu.edu/mhirsch/files/2012/08/Rotate180CCW-checkerboard.mj2_.zip
and at least allows to demux the file properly instead
of failing during probing.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n2.0
Reimar Döffinger 12 years ago
parent
commit
d82729e5d9
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/jpeg2000dec.c

+ 2
- 0
libavcodec/jpeg2000dec.c View File

@@ -1269,6 +1269,8 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, void *data,
"couldn't find jpeg2k codestream atom\n"); "couldn't find jpeg2k codestream atom\n");
return -1; return -1;
} }
} else if (AV_RB16(s->buf) != JPEG2000_SOC && AV_RB32(s->buf + 4) == JP2_CODESTREAM) {
s->buf += 8;
} }


if (bytestream_get_be16(&s->buf) != JPEG2000_SOC) { if (bytestream_get_be16(&s->buf) != JPEG2000_SOC) {


Loading…
Cancel
Save