mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 21:12:23 +00:00
Simplify and make lzo decompression code more similar to zlib one.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22029 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d7da0ebc20
commit
92258be85a
@ -637,9 +637,10 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest,
|
||||
return modified;
|
||||
}
|
||||
|
||||
*dest = malloc (dstlen);
|
||||
*dest = NULL;
|
||||
while (1)
|
||||
{
|
||||
*dest = realloc (*dest, dstlen);
|
||||
result = lzo1x_decompress_safe (src, *size, *dest, &dstlen,
|
||||
NULL);
|
||||
if (result == LZO_E_OK)
|
||||
@ -655,7 +656,6 @@ demux_mkv_decode (mkv_track_t *track, uint8_t *src, uint8_t **dest,
|
||||
mp_msg (MSGT_DEMUX, MSGL_DBG2,
|
||||
"[mkv] lzo decompression buffer too small.\n");
|
||||
dstlen *= 2;
|
||||
*dest = realloc (*dest, dstlen);
|
||||
}
|
||||
*size = dstlen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user