summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-14 17:38:44 +0100
committerwm4 <wm4@nowhere>2014-01-14 17:38:44 +0100
commitbbbea7934f6c3f1531e000e4b51ff8adcca7923c (patch)
tree611e5cf04925caf67f0f50d172378560013a767e /demux
parent72d5273bc15ee7b33a145e02fe80b822c863bbdc (diff)
downloadmpv-bbbea7934f6c3f1531e000e4b51ff8adcca7923c.tar.bz2
mpv-bbbea7934f6c3f1531e000e4b51ff8adcca7923c.tar.xz
ebml: remove unused functions
These were mostly replaced by ebml_read_element().
Diffstat (limited to 'demux')
-rw-r--r--demux/ebml.c86
-rw-r--r--demux/ebml.h4
2 files changed, 0 insertions, 90 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__)
diff --git a/demux/ebml.h b/demux/ebml.h
index b934ee5c34..80943d33e4 100644
--- a/demux/ebml.h
+++ b/demux/ebml.h
@@ -99,12 +99,8 @@ 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);
-double ebml_read_float (stream_t *s, uint64_t *length);
-char *ebml_read_ascii (stream_t *s, uint64_t *length);
-char *ebml_read_utf8 (stream_t *s, uint64_t *length);
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);
-uint32_t ebml_read_master (stream_t *s, uint64_t *length);
int ebml_read_element(struct stream *s, struct ebml_parse_ctx *ctx,
void *target, const struct ebml_elem_desc *desc);