[FFmpeg-cvslog] r14595 - trunk/libavformat/matroskadec.c
aurel
subversion
Tue Aug 5 02:42:11 CEST 2008
Author: aurel
Date: Tue Aug 5 02:42:10 2008
New Revision: 14595
Log:
matroskadec: don't care about the number of bytes read by ebml_read_element_id()
Modified:
trunk/libavformat/matroskadec.c
Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c (original)
+++ trunk/libavformat/matroskadec.c Tue Aug 5 02:42:10 2008
@@ -527,7 +527,7 @@ static int ebml_read_num(MatroskaDemuxCo
/*
* Read: the element content data ID.
- * Return: the number of bytes read or < 0 on error.
+ * 0 is success, < 0 is failure.
*/
static int ebml_read_element_id(MatroskaDemuxContext *matroska, uint32_t *id)
{
@@ -545,7 +545,7 @@ static int ebml_read_element_id(Matroska
return read;
*id = matroska->peek_id = total | (1 << (read * 7));
- return read;
+ return 0;
}
/*
@@ -908,7 +908,7 @@ static int ebml_parse_id(MatroskaDemuxCo
static int ebml_parse(MatroskaDemuxContext *matroska, EbmlSyntax *syntax,
void *data, int once)
{
- int i, res = 0, res2;
+ int i, res = 0;
uint32_t id = 0;
for (i=0; syntax[i].id; i++)
@@ -926,9 +926,8 @@ static int ebml_parse(MatroskaDemuxConte
}
while (!res && !ebml_level_end(matroska)) {
- res2 = ebml_read_element_id(matroska, &id);
- if (res2 < 0)
- break;
+ res = ebml_read_element_id(matroska, &id);
+ if (!res)
res = ebml_parse_id(matroska, syntax, id, data);
if (once)
break;
More information about the ffmpeg-cvslog
mailing list