summaryrefslogtreecommitdiff
path: root/libavformat/img2enc.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-18 12:09:20 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-18 12:09:20 +0000
commitf5f29910dda982956a545896f2e685d5522722c3 (patch)
tree7a332cacacb3b9a3e63e8af3f5b06da1e535593a /libavformat/img2enc.c
parentab82b77822a781ce8e6705aa6db8c8c1b4630d58 (diff)
img2enc: remove dead code
Nothing in lavc sets extradata for such codec and this is wrong place for it anyway. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/img2enc.c')
-rw-r--r--libavformat/img2enc.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 58236eb1d5..bbdb640491 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -114,31 +114,6 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_close(pb[3]);
}
}else{
- if(ff_guess_image2_codec(s->filename) == AV_CODEC_ID_JPEG2000){
- AVStream *st = s->streams[0];
- if(st->codec->extradata_size > 8 &&
- AV_RL32(st->codec->extradata+4) == MKTAG('j','p','2','h')){
- if(pkt->size < 8 || AV_RL32(pkt->data+4) != MKTAG('j','p','2','c'))
- goto error;
- avio_wb32(pb[0], 12);
- ffio_wfourcc(pb[0], "jP ");
- avio_wb32(pb[0], 0x0D0A870A); // signature
- avio_wb32(pb[0], 20);
- ffio_wfourcc(pb[0], "ftyp");
- ffio_wfourcc(pb[0], "jp2 ");
- 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
- error:
- av_log(s, AV_LOG_ERROR, "malformed JPEG 2000 codestream %X\n", AV_RB32(pkt->data));
- return -1;
- }
- }
avio_write(pb[0], pkt->data, pkt->size);
}
avio_flush(pb[0]);