Mercurial > libavformat.hg
changeset 3654:31788edc69c1 libavformat
matroskadec: remove some unused ebml funcs
author | aurel |
---|---|
date | Tue, 05 Aug 2008 00:41:07 +0000 |
parents | 9db1fca3bd30 |
children | e178e2725a59 |
files | matroskadec.c |
diffstat | 1 files changed, 0 insertions(+), 52 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Tue Aug 05 00:41:05 2008 +0000 +++ b/matroskadec.c Tue Aug 05 00:41:07 2008 +0000 @@ -689,45 +689,6 @@ } /* - * Read the next element as a signed int. - * 0 is success, < 0 is failure. - */ - -static int -ebml_read_sint (MatroskaDemuxContext *matroska, - uint32_t *id, - int64_t *num) -{ - ByteIOContext *pb = matroska->ctx->pb; - int size, n = 1, negative = 0, res; - uint64_t rlength; - - if ((res = ebml_read_element_id(matroska, id, NULL)) < 0 || - (res = ebml_read_element_length(matroska, &rlength)) < 0) - return res; - size = rlength; - if (size < 1 || size > 8) { - offset_t pos = url_ftell(pb); - av_log(matroska->ctx, AV_LOG_ERROR, - "Invalid sint element size %d at position %"PRId64" (0x%"PRIx64")\n", - size, pos, pos); - return AVERROR_INVALIDDATA; - } - if ((*num = get_byte(pb)) & 0x80) { - negative = 1; - *num &= ~0x80; - } - while (n++ < size) - *num = (*num << 8) | get_byte(pb); - - /* make signed */ - if (negative) - *num = *num - (1LL << ((8 * size) - 1)); - - return 0; -} - -/* * Read the next element as a float. * 0 is success, < 0 is failure. */ @@ -799,19 +760,6 @@ } /* - * Read the next element as a UTF-8 string. - * 0 is success, < 0 is failure. - */ - -static int -ebml_read_utf8 (MatroskaDemuxContext *matroska, - uint32_t *id, - char **str) -{ - return ebml_read_ascii(matroska, id, str); -} - -/* * Read the next element, but only the header. The contents * are supposed to be sub-elements which can be read separately. * 0 is success, < 0 is failure.