# HG changeset patch # User aurel # Date 1217896867 0 # Node ID 31788edc69c1191a70cfeb14e632bc8e780c81f7 # Parent 9db1fca3bd3026b19728319dd6ba18de74824f0e matroskadec: remove some unused ebml funcs diff -r 9db1fca3bd30 -r 31788edc69c1 matroskadec.c --- 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.