Mercurial > mplayer.hg
changeset 28973:9ae8c54007f5
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
author | diego |
---|---|
date | Thu, 19 Mar 2009 23:33:35 +0000 |
parents | 74f99934fb48 |
children | 341e3ff25281 |
files | libswscale/swscale-example.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/swscale-example.c Thu Mar 19 23:29:19 2009 +0000 +++ b/libswscale/swscale-example.c Thu Mar 19 23:33:35 2009 +0000 @@ -57,7 +57,8 @@ int srcStride[3], dstStride[3]; int i; uint64_t ssdY, ssdU, ssdV; - struct SwsContext *srcContext, *dstContext, *outContext; + struct SwsContext *srcContext = NULL, *dstContext = NULL, + *outContext = NULL; int res; res = 0; @@ -84,7 +85,6 @@ } } - dstContext = outContext = NULL; srcContext= sws_getContext(w, h, PIX_FMT_YUV420P, srcW, srcH, srcFormat, flags, NULL, NULL, NULL); if (!srcContext) { fprintf(stderr, "Failed to get %s ---> %s\n",