[FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c

Michael Niedermayer michael at niedermayer.cc
Sun Mar 27 21:43:00 CEST 2016


On Sun, Mar 27, 2016 at 04:39:39PM +0000, Petru Rares Sincraian wrote:
> 
> 	- Added test for: swscale_license()
> 	- Added test for: alphaless_fmt()
> 	- Added test for: alloc_gamma_tbl()
[...]

> +static void test_alloc_gamma_tbl(void)
> +{
> +    uint16_t *tbl = alloc_gamma_tbl(1.);
> +    int i;
> +
> +    // print only 32 elements
> +    printf("e = 1.0\n");
> +    for (i = 0; i < 65536; i += 2048)
> +        printf("it: %d\t value: %d\n", i, tbl[i]);
> +
> +    tbl = alloc_gamma_tbl(0.75);
> +    printf("\ne = 0.75\n");
> +    for (i = 0; i < 65536; i += 2048)
> +        printf("it: %d\t value: %d\n", i, tbl[i]);
> +
> +    tbl = alloc_gamma_tbl(2.8);
> +    printf("\ne = 2.8\n");
> +    for (i = 0; i < 65536; i += 2048)
> +        printf("it: %d\t value: %d\n", i, tbl[i]);

this leaks memory

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160327/ebc971be/attachment.sig>


More information about the ffmpeg-devel mailing list