[SCM] libav/experimental: When bswap_32 is a macro, png images fail to decode properly, patch by (Milan Cutka <cutka>at<szm>dot<sk>)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:42:09 UTC 2013


The following commit has been merged in the experimental branch:
commit e20815b3967bb00d26b9a0f80724e998b47e4f5a
Author: Milan Cutka <cutka at szm.sk>
Date:   Fri Nov 12 09:48:06 2004 +0000

    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

diff --git a/libavcodec/png.c b/libavcodec/png.c
index 079795a..11faa86 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),

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list