Commit 47634881 authored by aurel's avatar aurel

matroskadec: don't try to re-read already parsed ID in matroska_parse_cluster()

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14600 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 79129f1c
......@@ -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++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment