Commit 7a262d72 authored by diego's avatar diego

Initialize *srcContext, *dstContext, *outContext to NULL, avoids the warnings:

libswscale/swscale-example.c:60: warning: 'outContext' may be used uninitialized in this function
libswscale/swscale-example.c:60: warning: 'dstContext' may be used uninitialized in this function
libswscale/swscale-example.c:60: warning: 'srcContext' may be used uninitialized in this function


git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@29008 b3059339-0415-0410-9bf9-f77b7e298cf2
parent d7112c29
...@@ -57,7 +57,8 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat ...@@ -57,7 +57,8 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
int srcStride[3], dstStride[3]; int srcStride[3], dstStride[3];
int i; int i;
uint64_t ssdY, ssdU, ssdV; uint64_t ssdY, ssdU, ssdV;
struct SwsContext *srcContext, *dstContext, *outContext; struct SwsContext *srcContext = NULL, *dstContext = NULL,
*outContext = NULL;
int res; int res;
res = 0; res = 0;
...@@ -84,7 +85,6 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat ...@@ -84,7 +85,6 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
} }
} }
dstContext = outContext = NULL;
srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL); srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL);
if (!srcContext) { if (!srcContext) {
fprintf(stderr, "Failed to get %s ---> %s\n", fprintf(stderr, "Failed to get %s ---> %s\n",
......
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