mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
bfea160094
commit
0047ac1427
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue