[FFmpeg-soc] [soc]: r1868 - in libavfilter: avfilter.c avfilter.h avfiltergraphdesc.c
vitor
subversion at mplayerhq.hu
Sat Feb 9 16:59:47 CET 2008
Author: vitor
Date: Sat Feb 9 16:59:47 2008
New Revision: 1868
Log:
Add const to silence warnings
Modified:
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/avfiltergraphdesc.c
Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c (original)
+++ libavfilter/avfilter.c Sat Feb 9 16:59:47 2008
@@ -288,7 +288,7 @@ void avfilter_draw_slice(AVFilterLink *l
link_dpad(link).draw_slice(link, y, h);
}
-AVFilter *avfilter_get_by_name(char *name)
+AVFilter *avfilter_get_by_name(const char *name)
{
struct FilterList *filt;
@@ -345,10 +345,9 @@ void avfilter_uninit(void)
static int pad_count(const AVFilterPad *pads)
{
- AVFilterPad *p = (AVFilterPad *) pads;
int count;
- for(count = 0; p->name; count ++) p ++;
+ for(count = 0; pads->name; count ++) pads ++;
return count;
}
@@ -358,7 +357,7 @@ static const char *filter_name(void *p)
return filter->filter->name;
}
-AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name)
+AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name)
{
AVFilterContext *ret;
Modified: libavfilter/avfilter.h
==============================================================================
--- libavfilter/avfilter.h (original)
+++ libavfilter/avfilter.h Sat Feb 9 16:59:47 2008
@@ -198,7 +198,7 @@ struct AVFilterPad
* input may have the same name as an output. This may be NULL if this
* pad has no need to ever be referenced by name.
*/
- char *name;
+ const char *name;
/**
* AVFilterPad type. Only video supported now, hopefully someone will
@@ -326,8 +326,8 @@ void avfilter_formats_changeref(AVFilter
*/
typedef struct
{
- char *name; ///< filter name
- char *author; ///< filter author
+ const char *name; ///< filter name
+ const char *author; ///< filter author
int priv_size; ///< size of private data to allocate for the filter
@@ -506,7 +506,7 @@ void avfilter_register(AVFilter *filter)
* @return The filter definition, if any matching one is registered.
* NULL if none found.
*/
-AVFilter *avfilter_get_by_name(char *name);
+AVFilter *avfilter_get_by_name(const char *name);
/**
* Create a filter instance
@@ -514,7 +514,7 @@ AVFilter *avfilter_get_by_name(char *nam
* @param inst_name Name to give to the new instance. Can be NULL for none.
* @return Pointer to the new instance on success. NULL on failure.
*/
-AVFilterContext *avfilter_open(AVFilter *filter, char *inst_name);
+AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name);
/**
* Initialize a filter
Modified: libavfilter/avfiltergraphdesc.c
==============================================================================
--- libavfilter/avfiltergraphdesc.c (original)
+++ libavfilter/avfiltergraphdesc.c Sat Feb 9 16:59:47 2008
@@ -39,7 +39,7 @@ static inline int is_line_comment(char *
static AVFilterGraphDescSection parse_section_name(char *line)
{
struct {
- char *str;
+ const char *str;
int section;
} *sec, sections[] = { { "[filters]", SEC_FILTERS },
{ "[links]", SEC_LINKS },
More information about the FFmpeg-soc
mailing list