From e32adef9c4775f9bfb696080b17193bbb58db507 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Jan 2014 17:38:51 +0100 Subject: ebml: remove length parameters from read functions Many ebml_read_* functions have a length int pointer parameter, which returns the number of bytes skipped. Nothing actually needed this (anymore), and code using it was rather hard to understand, so get rid of them. --- demux/ebml.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'demux/ebml.h') diff --git a/demux/ebml.h b/demux/ebml.h index 80943d33e4..5a0af48e8c 100644 --- a/demux/ebml.h +++ b/demux/ebml.h @@ -61,7 +61,6 @@ struct ebml_elem_desc { struct ebml_parse_ctx { struct mp_log *log; void *talloc_ctx; - int bytes_read; bool has_errors; bool no_error_messages; }; @@ -93,12 +92,12 @@ struct ebml_parse_ctx { bool ebml_is_mkv_level1_id(uint32_t id); -uint32_t ebml_read_id (stream_t *s, int *length); +uint32_t ebml_read_id (stream_t *s); uint64_t ebml_read_vlen_uint (bstr *buffer); int64_t ebml_read_vlen_int (bstr *buffer); -uint64_t ebml_read_length (stream_t *s, int *length); -uint64_t ebml_read_uint (stream_t *s, uint64_t *length); -int64_t ebml_read_int (stream_t *s, uint64_t *length); +uint64_t ebml_read_length (stream_t *s); +uint64_t ebml_read_uint (stream_t *s); +int64_t ebml_read_int (stream_t *s); int ebml_read_skip(struct mp_log *log, int64_t end, stream_t *s); int ebml_resync_cluster(struct mp_log *log, stream_t *s); -- cgit v1.2.3