[FFmpeg-devel] [PATCH] lavu: keep context size variables

Michael Niedermayer michaelni at gmx.at
Fri Oct 12 19:01:29 CEST 2012


They are essential to be able to use the utils without av_malloc()
That is for example use with malloc(), memalign(), some other
private allocation function, on the stack or others.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 doc/APIchanges   |    1 -
 libavutil/aes.c  |    2 --
 libavutil/aes.h  |    4 +---
 libavutil/md5.c  |    2 --
 libavutil/md5.h  |    4 +---
 libavutil/sha.c  |    2 --
 libavutil/sha.h  |    4 +---
 libavutil/tree.c |    2 --
 libavutil/tree.h |    4 +---
 9 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 1d6d34b..c9d7c38 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -104,7 +104,6 @@ API changes, most recent first:
 
 2012-10-xx - xxxxxxx - lavu 51.43.0 - aes.h, md5.h, sha.h, tree.h
   Add functions for allocating the opaque contexts for the algorithms,
-  deprecate the context size variables.
 
 2012-10-xx - xxxxxxx - lavf 54.18.0 - avio.h
   Add avio_closep to complement avio_close.
diff --git a/libavutil/aes.c b/libavutil/aes.c
index 555cbb8..a3eb295 100644
--- a/libavutil/aes.c
+++ b/libavutil/aes.c
@@ -39,9 +39,7 @@ typedef struct AVAES {
     int rounds;
 } AVAES;
 
-#if FF_API_CONTEXT_SIZE
 const int av_aes_size= sizeof(AVAES);
-#endif
 
 struct AVAES *av_aes_alloc(void)
 {
diff --git a/libavutil/aes.h b/libavutil/aes.h
index 9c1a54e..09efbda 100644
--- a/libavutil/aes.h
+++ b/libavutil/aes.h
@@ -32,9 +32,7 @@
  * @{
  */
 
-#if FF_API_CONTEXT_SIZE
-extern attribute_deprecated const int av_aes_size;
-#endif
+extern const int av_aes_size;
 
 struct AVAES;
 
diff --git a/libavutil/md5.c b/libavutil/md5.c
index ce8400f..d0d0d27 100644
--- a/libavutil/md5.c
+++ b/libavutil/md5.c
@@ -42,9 +42,7 @@ typedef struct AVMD5{
     uint32_t ABCD[4];
 } AVMD5;
 
-#if FF_API_CONTEXT_SIZE
 const int av_md5_size = sizeof(AVMD5);
-#endif
 
 struct AVMD5 *av_md5_alloc(void)
 {
diff --git a/libavutil/md5.h b/libavutil/md5.h
index 69199cc..1d7be9f 100644
--- a/libavutil/md5.h
+++ b/libavutil/md5.h
@@ -32,9 +32,7 @@
  * @{
  */
 
-#if FF_API_CONTEXT_SIZE
-extern attribute_deprecated const int av_md5_size;
-#endif
+extern const int av_md5_size;
 
 struct AVMD5;
 
diff --git a/libavutil/sha.c b/libavutil/sha.c
index e3a956a..8d5ca45 100644
--- a/libavutil/sha.c
+++ b/libavutil/sha.c
@@ -38,9 +38,7 @@ typedef struct AVSHA {
     void     (*transform)(uint32_t *state, const uint8_t buffer[64]);
 } AVSHA;
 
-#if FF_API_CONTEXT_SIZE
 const int av_sha_size = sizeof(AVSHA);
-#endif
 
 struct AVSHA *av_sha_alloc(void)
 {
diff --git a/libavutil/sha.h b/libavutil/sha.h
index 744c66f..bf4377e 100644
--- a/libavutil/sha.h
+++ b/libavutil/sha.h
@@ -32,9 +32,7 @@
  * @{
  */
 
-#if FF_API_CONTEXT_SIZE
-extern attribute_deprecated const int av_sha_size;
-#endif
+extern const int av_sha_size;
 
 struct AVSHA;
 
diff --git a/libavutil/tree.c b/libavutil/tree.c
index cba6fe8..5803c2a 100644
--- a/libavutil/tree.c
+++ b/libavutil/tree.c
@@ -28,9 +28,7 @@ typedef struct AVTreeNode {
     int state;
 } AVTreeNode;
 
-#if FF_API_CONTEXT_SIZE
 const int av_tree_node_size = sizeof(AVTreeNode);
-#endif
 
 struct AVTreeNode *av_tree_node_alloc(void)
 {
diff --git a/libavutil/tree.h b/libavutil/tree.h
index 7187496..13fb91b 100644
--- a/libavutil/tree.h
+++ b/libavutil/tree.h
@@ -43,9 +43,7 @@
 
 
 struct AVTreeNode;
-#if FF_API_CONTEXT_SIZE
-extern attribute_deprecated const int av_tree_node_size;
-#endif
+extern const int av_tree_node_size;
 
 /**
  * Allocate an AVTreeNode.
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list