summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_mkv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-26 16:38:39 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-27 14:26:48 +0200
commit16ee636a58c7e0eb1e44b85681ea61fd692fef7f (patch)
tree6503ef86e2da2c4cb5555fc6c514833e09bd3307 /libmpdemux/demux_mkv.c
parent51fc1f839b301537fae21ab6c3a737a5622bd682 (diff)
downloadmpv-16ee636a58c7e0eb1e44b85681ea61fd692fef7f.tar.bz2
mpv-16ee636a58c7e0eb1e44b85681ea61fd692fef7f.tar.xz
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.
Diffstat (limited to 'libmpdemux/demux_mkv.c')
-rw-r--r--libmpdemux/demux_mkv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 00dfe3ae08..982f04062d 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -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;