Merge pull request #1901 from heuripedes/master

Fix  #1894
This commit is contained in:
Twinaphex 2015-07-05 15:59:54 +02:00
commit 4d4f56ec9a
4 changed files with 19 additions and 0 deletions

View File

@ -617,7 +617,10 @@ int zlib_parse_file_iterate(void *data, bool *returnerr, const char *file,
*returnerr = false;
case ZLIB_TRANSFER_DEINIT:
if (state->handle)
{
state->backend->free(state->handle);
state->handle = NULL;
}
break;
}
@ -628,6 +631,16 @@ int zlib_parse_file_iterate(void *data, bool *returnerr, const char *file,
return 0;
}
void zlib_parse_file_iterate_stop(void *data)
{
zlib_transfer_t *state = (zlib_transfer_t*)data;
if (!state || !state->handle)
return;
state->type = ZLIB_TRANSFER_DEINIT;
zlib_parse_file_iterate(data, NULL, NULL, NULL, NULL, NULL);
}
/**
* zlib_parse_file:
* @file : filename path of archive

View File

@ -83,6 +83,8 @@ int zlib_parse_file_iterate(void *data, bool *returnerr,
const char *file,
const char *valid_exts, zlib_file_cb file_cb, void *userdata);
void zlib_parse_file_iterate_stop(void *data);
/**
* zlib_extract_first_content_file:
* @zip_path : filename path to ZIP archive.

View File

@ -55,3 +55,4 @@ HAVE_7ZIP=yes # Compile in 7z support
HAVE_PRESERVE_DYLIB=no # Disable dlclose() for Valgrind support
HAVE_PARPORT=auto # Parallel port joypad support
HAVE_IMAGEVIEWER=yes # Built-in image viewer support.
HAVE_MMAP=auto # MMAP support

View File

@ -286,6 +286,9 @@ static int database_info_iterate_playlist_zip(
&returnerr, name, NULL, zlib_compare_crc32,
(void*)db_state) != 0)
return 0;
if (db_state->crc)
zlib_parse_file_iterate_stop(&db->state);
}
#endif