summaryrefslogtreecommitdiffstats
path: root/libmpdemux/ebml.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-26 14:41:07 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-27 14:26:48 +0200
commitdb41501f230f8f29c1c32584bc4d12dfc87ce498 (patch)
tree8ed31f05f58b56a67caa960b0b8d65ff3670b0df /libmpdemux/ebml.c
parentfc907b7488571ceee0012baf4e6f753c423b122e (diff)
downloadmpv-db41501f230f8f29c1c32584bc4d12dfc87ce498.tar.bz2
mpv-db41501f230f8f29c1c32584bc4d12dfc87ce498.tar.xz
demux_mkv: use new EBML parser to read Audio element
Diffstat (limited to 'libmpdemux/ebml.c')
-rw-r--r--libmpdemux/ebml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/ebml.c b/libmpdemux/ebml.c
index 8bbcad4db0..ab35237a44 100644
--- a/libmpdemux/ebml.c
+++ b/libmpdemux/ebml.c
@@ -643,7 +643,7 @@ int ebml_read_element(struct stream *s, struct ebml_parse_ctx *ctx,
{
ctx->has_errors = false;
int msglevel = ctx->no_error_messages ? MSGL_DBG2 : MSGL_WARN;
- uint64_t length = ebml_read_length(s, NULL);
+ uint64_t length = ebml_read_length(s, &ctx->bytes_read);
if (s->eof) {
mp_msg(MSGT_DEMUX, msglevel, "[mkv] Unexpected end of file "
"- partial or corrupt file?\n");
@@ -656,6 +656,7 @@ int ebml_read_element(struct stream *s, struct ebml_parse_ctx *ctx,
}
ctx->talloc_ctx = talloc_size(NULL, length + 8);
int read_len = stream_read(s, ctx->talloc_ctx, length);
+ ctx->bytes_read += read_len;
if (read_len < length)
mp_msg(MSGT_DEMUX, msglevel, "[mkv] Unexpected end of file "
"- partial or corrupt file?\n");