Commit 0020c54c authored by Diego Biurrun's avatar Diego Biurrun

Add const qualifier to param argument of sws_getContext() and

sws_getCachedContext().  Fixes the warning:
swscale.c:3408: warning: assignment discards qualifiers from pointer target type

Originally committed as revision 29288 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent 465477e1
...@@ -2371,7 +2371,8 @@ static int handle_jpeg(enum PixelFormat *format) ...@@ -2371,7 +2371,8 @@ static int handle_jpeg(enum PixelFormat *format)
} }
SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter, double *param){ SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
{
SwsContext *c; SwsContext *c;
int i; int i;
...@@ -3400,7 +3401,7 @@ void sws_freeContext(SwsContext *c){ ...@@ -3400,7 +3401,7 @@ void sws_freeContext(SwsContext *c){
struct SwsContext *sws_getCachedContext(struct SwsContext *context, struct SwsContext *sws_getCachedContext(struct SwsContext *context,
int srcW, int srcH, enum PixelFormat srcFormat, int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat, int flags, int dstW, int dstH, enum PixelFormat dstFormat, int flags,
SwsFilter *srcFilter, SwsFilter *dstFilter, double *param) SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
{ {
static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT}; static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT};
......
...@@ -130,7 +130,7 @@ void sws_freeContext(struct SwsContext *swsContext); ...@@ -130,7 +130,7 @@ void sws_freeContext(struct SwsContext *swsContext);
struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat, int dstW, int dstH, enum PixelFormat dstFormat,
int flags, SwsFilter *srcFilter, int flags, SwsFilter *srcFilter,
SwsFilter *dstFilter, double *param); SwsFilter *dstFilter, const double *param);
/** /**
* Scales the image slice in \p srcSlice and puts the resulting scaled * Scales the image slice in \p srcSlice and puts the resulting scaled
...@@ -258,6 +258,6 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, ...@@ -258,6 +258,6 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
int srcW, int srcH, enum PixelFormat srcFormat, int srcW, int srcH, enum PixelFormat srcFormat,
int dstW, int dstH, enum PixelFormat dstFormat, int dstW, int dstH, enum PixelFormat dstFormat,
int flags, SwsFilter *srcFilter, int flags, SwsFilter *srcFilter,
SwsFilter *dstFilter, double *param); SwsFilter *dstFilter, const double *param);
#endif /* SWSCALE_SWSCALE_H */ #endif /* SWSCALE_SWSCALE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment