diff mjpegenc.c @ 5089:bff60ecc02f9 libavcodec

Use AV_xx throughout libavcodec
author ramiro
date Sat, 02 Jun 2007 01:41:07 +0000
parents 9ce0052d533a
children 470601203f44
line wrap: on
line diff
--- a/mjpegenc.c	Fri Jun 01 21:17:05 2007 +0000
+++ b/mjpegenc.c	Sat Jun 02 01:41:07 2007 +0000
@@ -147,8 +147,7 @@
                               ff_mjpeg_val_ac_luminance);
     size += put_huffman_table(s, 1, 1, ff_mjpeg_bits_ac_chrominance,
                               ff_mjpeg_val_ac_chrominance);
-    ptr[0] = size >> 8;
-    ptr[1] = size;
+    AV_WB16(ptr, size);
 }
 
 static void jpeg_put_comments(MpegEncContext *s)
@@ -179,8 +178,7 @@
         put_bits(p, 16, 0); /* patched later */
         ff_put_string(p, LIBAVCODEC_IDENT, 1);
         size = strlen(LIBAVCODEC_IDENT)+3;
-        ptr[0] = size >> 8;
-        ptr[1] = size;
+        AV_WB16(ptr, size);
     }
 
     if(  s->avctx->pix_fmt == PIX_FMT_YUV420P
@@ -192,8 +190,7 @@
         put_bits(p, 16, 0); /* patched later */
         ff_put_string(p, "CS=ITU601", 1);
         size = strlen("CS=ITU601")+3;
-        ptr[0] = size >> 8;
-        ptr[1] = size;
+        AV_WB16(ptr, size);
     }
 }