summaryrefslogtreecommitdiff
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-08 22:52:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-08 22:52:35 +0000
commit99683a307776a7638ccce236a4ce5aa3e914e77d (patch)
tree0660e22b28db65af16a2f4679f0e7c64c5e67c3a /libavcodec/mjpeg.c
parentf02ab8148c622d5547ef81d1e0c1a357d05134bc (diff)
2 byte shorter userdata for mpeg4
in the past it was startcode,string,00,7F,startcode now it is startcode,string,stratcode both are mpeg4 compliant, as according to the standard the userdata lasts until the next 00 00 01 (startcode prefix) but some very primitive decoders which simply skip until the first 00 byte and then expect the next valid startcode might fail with the old variant, just a theory though (didnt test if quicktime can decode it now) Originally committed as revision 2767 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index ca64fb2b13..7aed3e28ac 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -378,7 +378,7 @@ static void jpeg_put_comments(MpegEncContext *s)
/* JFIF header */
put_marker(p, APP0);
put_bits(p, 16, 16);
- put_string(p, "JFIF"); /* this puts the trailing zero-byte too */
+ put_string(p, "JFIF", 1); /* this puts the trailing zero-byte too */
put_bits(p, 16, 0x0201); /* v 1.02 */
put_bits(p, 8, 0); /* units type: 0 - aspect ratio */
put_bits(p, 16, s->avctx->sample_aspect_ratio.num);
@@ -393,7 +393,7 @@ static void jpeg_put_comments(MpegEncContext *s)
flush_put_bits(p);
ptr = pbBufPtr(p);
put_bits(p, 16, 0); /* patched later */
- put_string(p, LIBAVCODEC_IDENT);
+ put_string(p, LIBAVCODEC_IDENT, 1);
size = strlen(LIBAVCODEC_IDENT)+3;
ptr[0] = size >> 8;
ptr[1] = size;