diff options
author | Jay Freeman <saurik@saurik.com> | 2008-06-02 09:38:57 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-06-02 09:38:57 +0000 |
commit | dc43e5190dc12ab3274cf7c6b4b1c373829bd088 (patch) | |
tree | 0985e52bc63b06d07233135860d258f32197f75b /data/ffmpeg_/mjpega.diff | |
parent | e8ad350a67d40e9131b7258af748e400a4504ed0 (diff) |
Fixed an upstream bug in ffmpeg's MJPEG-A bitstream filter that kept it from working with the iPhone's hardware JPEG encoder.
git-svn-id: http://svn.telesphoreo.org/trunk@298 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/ffmpeg_/mjpega.diff')
-rw-r--r-- | data/ffmpeg_/mjpega.diff | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/data/ffmpeg_/mjpega.diff b/data/ffmpeg_/mjpega.diff new file mode 100644 index 000000000..c82baa8d3 --- /dev/null +++ b/data/ffmpeg_/mjpega.diff @@ -0,0 +1,32 @@ +diff -ru ffmpeg-export-2008-05-20/libavcodec/mjpega_dump_header_bsf.c ffmpeg-export-2008-05-20+iPhone/libavcodec/mjpega_dump_header_bsf.c +--- ffmpeg-export-2008-05-20/libavcodec/mjpega_dump_header_bsf.c 2007-05-19 00:53:41.000000000 +0000 ++++ ffmpeg-export-2008-05-20+iPhone/libavcodec/mjpega_dump_header_bsf.c 2008-06-02 02:56:08.000000000 +0000 +@@ -56,15 +56,24 @@ + bytestream_put_be32(&poutbufp, buf_size + 44); /* pad field size */ + bytestream_put_be32(&poutbufp, 0); /* next ptr */ + ++ uint32_t dqt = 0, dht = 0, sof0 = 0; ++ + for (i = 0; i < buf_size - 1; i++) { + if (buf[i] == 0xff) { + switch (buf[i + 1]) { +- case DQT: /* quant off */ +- case DHT: /* huff off */ +- case SOF0: /* image off */ +- bytestream_put_be32(&poutbufp, i + 46); ++ case DQT: ++ dqt = i + 46; ++ break; ++ case DHT: ++ dht = i + 46; ++ break; ++ case SOF0: ++ sof0 = i + 46; + break; + case SOS: ++ bytestream_put_be32(&poutbufp, dqt); /* quant off */ ++ bytestream_put_be32(&poutbufp, dht); /* huff off */ ++ bytestream_put_be32(&poutbufp, sof0); /* image off */ + bytestream_put_be32(&poutbufp, i + 46); /* scan off */ + bytestream_put_be32(&poutbufp, i + 46 + AV_RB16(buf + i + 2)); /* data off */ + bytestream_put_buffer(&poutbufp, buf + 2, buf_size - 2); /* skip already written SOI */ |