mirror of
https://github.com/nothings/stb
synced 2025-01-05 22:34:23 +03:00
Merge branch 'patch-1' of https://github.com/RufUsul/stb into working
This commit is contained in:
commit
8905cb9a8e
@ -3593,11 +3593,12 @@ static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int re
|
|||||||
static int stbi__jpeg_test(stbi__context *s)
|
static int stbi__jpeg_test(stbi__context *s)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
stbi__jpeg j;
|
stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
|
||||||
j.s = s;
|
j->s = s;
|
||||||
stbi__setup_jpeg(&j);
|
stbi__setup_jpeg(j);
|
||||||
r = stbi__decode_jpeg_header(&j, STBI__SCAN_type);
|
r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
|
||||||
stbi__rewind(s);
|
stbi__rewind(s);
|
||||||
|
STBI_FREE(j);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user