img2enc: Accept raw jpeg2000 codestream too,
our decoder outputs that, jasper can as well Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -436,6 +436,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
avio_wb32(pb[0], 0);
|
avio_wb32(pb[0], 0);
|
||||||
ffio_wfourcc(pb[0], "jp2 ");
|
ffio_wfourcc(pb[0], "jp2 ");
|
||||||
avio_write(pb[0], st->codec->extradata, st->codec->extradata_size);
|
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 ||
|
}else if(pkt->size < 8 ||
|
||||||
(!st->codec->extradata_size &&
|
(!st->codec->extradata_size &&
|
||||||
AV_RL32(pkt->data+4) != MKTAG('j','P',' ',' '))){ // signature
|
AV_RL32(pkt->data+4) != MKTAG('j','P',' ',' '))){ // signature
|
||||||
|
Reference in New Issue
Block a user