[FFmpeg-cvslog] img2enc: Accept raw jpeg2000 codestream too,
Michael Niedermayer
git at videolan.org
Tue Sep 27 21:34:39 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 27 20:45:59 2011 +0200| [0047ac1427005d59c9448ecf287f1408ff4c19e1] | committer: Michael Niedermayer
img2enc: Accept raw jpeg2000 codestream too,
our decoder outputs that, jasper can as well
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0047ac1427005d59c9448ecf287f1408ff4c19e1
---
libavformat/img2.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 77145cb..a2a4a01 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
More information about the ffmpeg-cvslog
mailing list