diff options
author | wm4 <wm4@nowhere> | 2014-01-14 17:38:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-14 17:38:44 +0100 |
commit | bbbea7934f6c3f1531e000e4b51ff8adcca7923c (patch) | |
tree | 611e5cf04925caf67f0f50d172378560013a767e /demux/ebml.c | |
parent | 72d5273bc15ee7b33a145e02fe80b822c863bbdc (diff) | |
download | mpv-bbbea7934f6c3f1531e000e4b51ff8adcca7923c.tar.bz2 mpv-bbbea7934f6c3f1531e000e4b51ff8adcca7923c.tar.xz |
ebml: remove unused functions
These were mostly replaced by ebml_read_element().
Diffstat (limited to 'demux/ebml.c')
-rw-r--r-- | demux/ebml.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/demux/ebml.c b/demux/ebml.c index 2c540ad093..d50647e5f0 100644 --- a/demux/ebml.c +++ b/demux/ebml.c @@ -207,70 +207,6 @@ int64_t ebml_read_int(stream_t *s, uint64_t *length) } /* - * Read the next element as a float. - */ -double ebml_read_float(stream_t *s, uint64_t *length) -{ - double value; - uint64_t len; - int l; - - len = ebml_read_length(s, &l); - switch (len) { - case 4: - value = av_int2float(stream_read_dword(s)); - break; - - case 8: - value = av_int2double(stream_read_qword(s)); - break; - - default: - return EBML_FLOAT_INVALID; - } - - if (length) - *length = len + l; - - return value; -} - -/* - * Read the next element as an ASCII string. - */ -char *ebml_read_ascii(stream_t *s, uint64_t *length) -{ - uint64_t len; - char *str; - int l; - - len = ebml_read_length(s, &l); - if (len == EBML_UINT_INVALID) - return NULL; - if (len > SIZE_MAX - 1) - return NULL; - if (length) - *length = len + l; - - str = malloc(len + 1); - if (stream_read(s, str, len) != (int) len) { - free(str); - return NULL; - } - str[len] = '\0'; - - return str; -} - -/* - * Read the next element as a UTF-8 string. - */ -char *ebml_read_utf8(stream_t *s, uint64_t *length) -{ - return ebml_read_ascii(s, length); -} - -/* * Skip the current element. * end: the end of the parent element or -1 (for robust error handling) */ @@ -322,28 +258,6 @@ int ebml_resync_cluster(struct mp_log *log, stream_t *s) return -1; } -/* - * Read the next element, but only the header. The contents - * are supposed to be sub-elements which can be read separately. - */ -uint32_t ebml_read_master(stream_t *s, uint64_t *length) -{ - uint64_t len; - uint32_t id; - - id = ebml_read_id(s, NULL); - if (id == EBML_ID_INVALID) - return id; - - len = ebml_read_length(s, NULL); - if (len == EBML_UINT_INVALID) - return EBML_ID_INVALID; - if (length) - *length = len; - - return id; -} - #define EVALARGS(F, ...) F(__VA_ARGS__) |