diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 00:42:58 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 00:42:58 +0000 |
commit | 88cca989471ccf28de34efbc07a87807bcd45941 (patch) | |
tree | c3707d8f62d470c040be833d4460ab42acda3732 /libavformat/matroskadec.c | |
parent | 33ac07ea08f47beebf51e43a4a2bc7fe81a9ad90 (diff) | |
download | ffmpeg-88cca989471ccf28de34efbc07a87807bcd45941.tar.gz |
matroskadec: expand useless ebml_read_element_id() wrapper
Originally committed as revision 14610 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 1d9f58dbb2..cc145961e0 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -522,23 +522,6 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, ByteIOContext *pb, } /* - * Read: the element content data ID. - * 0 is success, < 0 is failure. - */ -static int ebml_read_element_id(MatroskaDemuxContext *matroska, uint32_t *id) -{ - int read; - uint64_t total; - - /* read out the "EBML number", include tag in ID */ - if ((read = ebml_read_num(matroska, matroska->ctx->pb, 4, &total)) < 0) - return read; - *id = total | (1 << (read * 7)); - - return 0; -} - -/* * Read the next element as an unsigned int. * 0 is success, < 0 is failure. */ @@ -683,8 +666,9 @@ static int ebml_parse_id(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, static int ebml_parse(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, void *data) { - uint32_t id; - int res = ebml_read_element_id(matroska, &id); + uint64_t id; + int res = ebml_read_num(matroska, matroska->ctx->pb, 4, &id); + id |= 1 << 7*res; return res < 0 ? res : ebml_parse_id(matroska, syntax, id, data); } |