Browse Source

img2enc: Accept raw jpeg2000 codestream too,

our decoder outputs that, jasper can as well

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 14 years ago
parent
commit
0047ac1427
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/img2.c

+ 2
- 0
libavformat/img2.c View File

@@ -436,6 +436,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wb32(pb[0], 0);
ffio_wfourcc(pb[0], "jp2 ");
avio_write(pb[0], st->codec->extradata, st->codec->extradata_size);
}else if(pkt->size >= 8 && AV_RB32(pkt->data) == 0xFF4FFF51){
//jpeg2000 codestream
}else if(pkt->size < 8 ||
(!st->codec->extradata_size &&
AV_RL32(pkt->data+4) != MKTAG('j','P',' ',' '))){ // signature


Loading…
Cancel
Save