[FFmpeg-cvslog] avfilter: have avfilter_get_by_name return const for next bump

Vittorio Giovara git at videolan.org
Mon Oct 28 13:13:25 CET 2013


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Oct 28 02:58:12 2013 +0100| [5c439b41d0489412c0a4cf6dfb98915251677b8e] | committer: Anton Khirnov

avfilter: have avfilter_get_by_name return const for next bump

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c439b41d0489412c0a4cf6dfb98915251677b8e
---

 libavfilter/avfilter.c |    3 +++
 libavfilter/avfilter.h |    3 +++
 libavfilter/version.h  |    3 +++
 3 files changed, 9 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 88e39bf..68e0f2c 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -272,6 +272,9 @@ int ff_poll_frame(AVFilterLink *link)
 
 static AVFilter *first_filter;
 
+#if !FF_API_NOCONST_GET_NAME
+const
+#endif
 AVFilter *avfilter_get_by_name(const char *name)
 {
     AVFilter *f = NULL;
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index ca11be9..9f14afd 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -764,6 +764,9 @@ int avfilter_register(AVFilter *filter);
  * @return     the filter definition, if any matching one is registered.
  *             NULL if none found.
  */
+#if !FF_API_NOCONST_GET_NAME
+const
+#endif
 AVFilter *avfilter_get_by_name(const char *name);
 
 /**
diff --git a/libavfilter/version.h b/libavfilter/version.h
index 9c84e0f..02f348e 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -68,5 +68,8 @@
 #ifndef FF_API_OLD_FILTER_REGISTER
 #define FF_API_OLD_FILTER_REGISTER          (LIBAVFILTER_VERSION_MAJOR < 4)
 #endif
+#ifndef FF_API_NOCONST_GET_NAME
+#define FF_API_NOCONST_GET_NAME             (LIBAVFILTER_VERSION_MAJOR < 4)
+#endif
 
 #endif /* AVFILTER_VERSION_H */



More information about the ffmpeg-cvslog mailing list