avfilter: have avfilter_get_by_name return const for next bump
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 28 Oct 2013 01:58:12 +0000 (02:58 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 28 Oct 2013 06:57:44 +0000 (07:57 +0100)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/version.h

index 88e39bf..68e0f2c 100644 (file)
@@ -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;
index ca11be9..9f14afd 100644 (file)
@@ -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);
 
 /**
index 9c84e0f..02f348e 100644 (file)
@@ -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 */