diff options
author | Milan Cutka <cutka@szm.sk> | 2004-11-12 09:48:06 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-11-12 09:48:06 +0000 |
commit | e20815b3967bb00d26b9a0f80724e998b47e4f5a (patch) | |
tree | 000080f7fba716ef1f76fe1c7661b010b90ef1f4 /libavcodec/png.c | |
parent | 788d7a8cacae917ff36310556f439006f253907f (diff) | |
download | ffmpeg-e20815b3967bb00d26b9a0f80724e998b47e4f5a.tar.gz |
When bswap_32 is a macro, png images fail to decode properly, patch by (Milan Cutka <cutka>at<szm>dot<sk>)
Originally committed as revision 3672 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/png.c')
-rw-r--r-- | libavcodec/png.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/png.c b/libavcodec/png.c index 079795ab9d..11faa866ae 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -501,12 +501,14 @@ static int decode_frame(AVCodecContext *avctx, if (ret != Z_OK) return -1; for(;;) { + int tag32; if (s->bytestream >= s->bytestream_end) goto fail; length = get32(&s->bytestream); if (length > 0x7fffffff) goto fail; - tag = bswap_32(get32(&s->bytestream)); + tag32 = get32(&s->bytestream); + tag = bswap_32(tag32); #ifdef DEBUG printf("png: tag=%c%c%c%c length=%u\n", (tag & 0xff), |