aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/png.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-06-02 01:41:07 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-06-02 01:41:07 +0000
commit2c124cb65c24cc7d0538260726045d68442eef25 (patch)
tree3752a8d02aa478d977264e8ce0438f49c92a4aca /libavcodec/png.c
parent29b29011e5631c4e867baf42258a00886d142841 (diff)
downloadffmpeg-2c124cb65c24cc7d0538260726045d68442eef25.tar.gz
Use AV_xx throughout libavcodec
Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/png.c')
-rw-r--r--libavcodec/png.c10
1 files changed, 2 insertions, 8 deletions
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) {