diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 04:42:26 +0400 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2008-08-05 04:42:26 +0400 |
commit | 387976383355ebb2d64eb6ef94a145594a6e015c (patch) | |
tree | d5b9a301ccc566b0d848b76dd5aea216820025eb /libavformat | |
parent | 6314cca006c9e278da69fcdbdfec64e592cdfc37 (diff) |
matroskadec: don't try to re-read already parsed ID in matroska_parse_cluster()
Originally committed as revision 14600 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskadec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 82b8960848..f4233066c2 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1631,7 +1631,15 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska) MatroskaCluster cluster = { 0 }; EbmlList *blocks_list; MatroskaBlock *blocks; - int i, res = ebml_parse(matroska, matroska_clusters, &cluster); + int i, res; + if (matroska->has_cluster_id){ + /* For the first cluster we parse, it's ID was already read as + part of matroska_read_header(), so don't read it again */ + res = ebml_parse_id(matroska, matroska_clusters, + MATROSKA_ID_CLUSTER, &cluster); + matroska->has_cluster_id = 0; + } else + res = ebml_parse(matroska, matroska_clusters, &cluster); blocks_list = &cluster.blocks; blocks = blocks_list->elem; for (i=0; !res && i<blocks_list->nb_elem; i++) |