[SCM] libav/experimental: 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

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:45:30 UTC 2013


The following commit has been merged in the experimental branch:
commit 0020c54cb887b5a516b3f2f3646385f3fe28b29e
Author: Diego Biurrun <diego at biurrun.de>
Date:   Sun May 10 14:00:00 2009 +0000

    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

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index d8f4b0b..31e3b83 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -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,
-                           SwsFilter *srcFilter, SwsFilter *dstFilter, double *param){
+                           SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
+{
 
     SwsContext *c;
     int i;
@@ -3400,7 +3401,7 @@ void sws_freeContext(SwsContext *c){
 struct SwsContext *sws_getCachedContext(struct SwsContext *context,
                                         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)
 {
     static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT};
 
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 4990ebf..f5856c3 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -130,7 +130,7 @@ void sws_freeContext(struct SwsContext *swsContext);
 struct 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 *dstFilter, const double *param);
 
 /**
  * Scales the image slice in \p srcSlice and puts the resulting scaled
@@ -258,6 +258,6 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context,
                                         int srcW, int srcH, enum PixelFormat srcFormat,
                                         int dstW, int dstH, enum PixelFormat dstFormat,
                                         int flags, SwsFilter *srcFilter,
-                                        SwsFilter *dstFilter, double *param);
+                                        SwsFilter *dstFilter, const double *param);
 
 #endif /* SWSCALE_SWSCALE_H */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list