Commit 0047ac14 authored by Michael Niedermayer's avatar Michael Niedermayer

img2enc: Accept raw jpeg2000 codestream too,

 our decoder outputs that, jasper can as well
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bfea1600
......@@ -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
......
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