From 2c124cb65c24cc7d0538260726045d68442eef25 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Sat, 2 Jun 2007 01:41:07 +0000 Subject: Use AV_xx throughout libavcodec Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/png.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'libavcodec/png.c') diff --git a/libavcodec/png.c b/libavcodec/png.c index 72c0e81f0b..5e30f42ad1 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -693,10 +693,7 @@ static void png_write_chunk(uint8_t **f, uint32_t tag, 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 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, 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) { -- cgit v1.2.3