demux_mkv: don't print errors for 0-size zlib decoding

Allow decoding a 0-sized buffer with zlib algorithm to produce 0-sized
output. Fixes spurious errors reported with subtitle tracks marked to
use compression for track private data without having any such data.
This commit is contained in:
Uoti Urpala 2010-01-26 16:38:39 +02:00
parent 51fc1f839b
commit 16ee636a58
1 changed files with 4 additions and 0 deletions

View File

@ -326,6 +326,10 @@ static int demux_mkv_decode(mkv_track_t *track, uint8_t *src,
#if CONFIG_ZLIB
if (track->encodings[i].comp_algo == 0) {
/* zlib encoded track */
if (*size == 0)
continue;
z_stream zstream;
zstream.zalloc = (alloc_func) 0;