diff png.c @ 5089:bff60ecc02f9 libavcodec

Use AV_xx throughout libavcodec
author ramiro
date Sat, 02 Jun 2007 01:41:07 +0000
parents 6166fbf375cc
children e9a0c447dc73
line wrap: on
line diff
--- a/png.c	Fri Jun 01 21:17:05 2007 +0000
+++ b/png.c	Sat Jun 02 01:41:07 2007 +0000
@@ -693,10 +693,7 @@
 
     bytestream_put_be32(f, length);
     crc = crc32(0, Z_NULL, 0);
-    tagbuf[0] = tag;
-    tagbuf[1] = tag >> 8;
-    tagbuf[2] = tag >> 16;
-    tagbuf[3] = tag >> 24;
+    AV_WL32(tagbuf, tag);
     crc = crc32(crc, tagbuf, 4);
     bytestream_put_be32(f, bswap_32(tag));
     if (length > 0) {
@@ -833,10 +830,7 @@
             if (alpha && alpha != 0xff)
                 has_alpha = 1;
             *alpha_ptr++ = alpha;
-            ptr[0] = v >> 16;
-            ptr[1] = v >> 8;
-            ptr[2] = v;
-            ptr += 3;
+            bytestream_put_be24(&ptr, v);
         }
         png_write_chunk(&s->bytestream, MKTAG('P', 'L', 'T', 'E'), s->buf, 256 * 3);
         if (has_alpha) {