Revision a4fc3bd5 libswscale/swscale-test.c

View differences:

libswscale/swscale-test.c
94 94
        /* An extra 16 bytes is being allocated because some scalers may write
95 95
         * out of bounds. */
96 96
        if (dstStride[i])
97
        dst[i]= av_mallocz(dstStride[i]*dstH+16);
97
            dst[i]= av_mallocz(dstStride[i]*dstH+16);
98 98
        if (refStride[i])
99
        out[i]= av_mallocz(refStride[i]*h);
99
            out[i]= av_mallocz(refStride[i]*h);
100 100
        if ((dstStride[i] && !dst[i]) || (refStride[i] && !out[i])) {
101 101
            perror("Malloc");
102 102
            res = -1;
......
159 159

  
160 160
    for (i=0; i<4; i++) {
161 161
        if (dstStride[i])
162
        av_free(dst[i]);
162
            av_free(dst[i]);
163 163
        if (refStride[i])
164
        av_free(out[i]);
164
            av_free(out[i]);
165 165
    }
166 166

  
167 167
    return res;
......
202 202
                av_fill_image_linesizes(srcStride, srcFormat, srcW);
203 203
                for (p = 0; p < 4; p++) {
204 204
                    if (srcStride[p])
205
                    src[p] = av_mallocz(srcStride[p]*srcH+16);
205
                        src[p] = av_mallocz(srcStride[p]*srcH+16);
206 206
                    if (srcStride[p] && !src[p]) {
207 207
                        perror("Malloc");
208 208
                        return;
......
227 227
                sws_freeContext(srcContext);
228 228
                for (p = 0; p < 4; p++)
229 229
                    if (srcStride[p])
230
                    av_free(src[p]);
230
                        av_free(src[p]);
231 231
            }
232 232
        }
233 233
    }

Also available in: Unified diff