diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-27 20:45:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-27 21:32:39 +0200 |
commit | 0047ac1427005d59c9448ecf287f1408ff4c19e1 (patch) | |
tree | 98b28afd0e081e92c00483cb5033000a0c37f974 | |
parent | bfea1600943d1455fb19f3fcf25fd79e64d3eef4 (diff) | |
download | ffmpeg-0047ac1427005d59c9448ecf287f1408ff4c19e1.tar.gz |
img2enc: Accept raw jpeg2000 codestream too,
our decoder outputs that, jasper can as well
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/img2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c index 77145cb1cf..a2a4a017d5 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -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 |