[FFmpeg-cvslog] mjpegenc: Fix JFIF header byte ordering

Shiina Hideaki git at videolan.org
Mon Jun 1 13:28:42 CEST 2015


ffmpeg | branch: release/2.2 | Shiina Hideaki <shiina at yndrd.com> | Thu May  7 01:46:55 2015 +0100| [5e886756ee687be5840867d3810991efe17a66c3] | committer: Reinhard Tartler

mjpegenc: Fix JFIF header byte ordering

The header had a wrong version description.

Bug-Id: 808
Signed-off-by: Shiina Hideaki <shiina at yndrd.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
(cherry picked from commit 5549f693d2181b3211427f65e48eaa2f4fc5a402)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

Conflicts:
	libavcodec/mjpegenc_common.c

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e886756ee687be5840867d3810991efe17a66c3
---

 libavcodec/mjpegenc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 30433c3..cf0f510 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -142,7 +142,10 @@ static void jpeg_put_comments(AVCodecContext *avctx, PutBitContext *p)
         put_marker(p, APP0);
         put_bits(p, 16, 16);
         avpriv_put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
-        put_bits(p, 16, 0x0201);         /* v 1.02 */
+        /* The most significant byte is used for major revisions, the least
+         * significant byte for minor revisions. Version 1.02 is the current
+         * released revision. */
+        put_bits(p, 16, 0x0102);
         put_bits(p,  8, 0);              /* units type: 0 - aspect ratio */
         put_bits(p, 16, avctx->sample_aspect_ratio.num);
         put_bits(p, 16, avctx->sample_aspect_ratio.den);



More information about the ffmpeg-cvslog mailing list