[SCM] libav/experimental: kill 3 more av_mallocz_static()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:57:49 UTC 2013


The following commit has been merged in the experimental branch:
commit 08cb1950209b53bf98bf2014ca584a6b0e138917
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Wed Mar 14 01:59:53 2007 +0000

    kill 3 more av_mallocz_static()
    
    Originally committed as revision 8397 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 6573e3c..74192ca 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1189,9 +1189,11 @@ unsigned avcodec_build( void )
 }
 
 static void init_crcs(void){
+#if LIBAVUTIL_VERSION_INT  < (50<<16)
     av_crc04C11DB7= av_mallocz_static(sizeof(AVCRC) * 257);
     av_crc8005    = av_mallocz_static(sizeof(AVCRC) * 257);
     av_crc07      = av_mallocz_static(sizeof(AVCRC) * 257);
+#endif
     av_crc_init(av_crc04C11DB7, 0, 32, 0x04c11db7, sizeof(AVCRC)*257);
     av_crc_init(av_crc8005    , 0, 16, 0x8005    , sizeof(AVCRC)*257);
     av_crc_init(av_crc07      , 0,  8, 0x07      , sizeof(AVCRC)*257);
diff --git a/libavutil/crc.c b/libavutil/crc.c
index baa605d..02fb860 100644
--- a/libavutil/crc.c
+++ b/libavutil/crc.c
@@ -21,10 +21,17 @@
 #include "common.h"
 #include "crc.h"
 
+#if LIBAVUTIL_VERSION_INT  < (50<<16)
 AVCRC *av_crcEDB88320;
 AVCRC *av_crc04C11DB7;
 AVCRC *av_crc8005    ;
 AVCRC *av_crc07      ;
+#else
+AVCRC av_crcEDB88320[257];
+AVCRC av_crc04C11DB7[257];
+AVCRC av_crc8005    [257];
+AVCRC av_crc07      [257];
+#endif
 
 /**
  * Inits a crc table.
diff --git a/libavutil/crc.h b/libavutil/crc.h
index e739c30..1f64319 100644
--- a/libavutil/crc.h
+++ b/libavutil/crc.h
@@ -23,10 +23,17 @@
 
 typedef uint32_t AVCRC;
 
+#if LIBAVUTIL_VERSION_INT  < (50<<16)
 extern AVCRC *av_crcEDB88320;
 extern AVCRC *av_crc04C11DB7;
 extern AVCRC *av_crc8005    ;
 extern AVCRC *av_crc07      ;
+#else
+extern AVCRC av_crcEDB88320[];
+extern AVCRC av_crc04C11DB7[];
+extern AVCRC av_crc8005    [];
+extern AVCRC av_crc07      [];
+#endif
 
 int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size);
 uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list