Commit f3ca3e7f authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by James Almer

avformat/matroskadec: Remove redundant initialization

Every new element of an EbmlList is zeroed initially in
ebml_parse_elem, so that in particular a SimpleBlock's duration is
initialized to zero. Therefore it is unnecessary to initialize this
field again (for SimpleBlocks) in matroska_parse_cluster_incremental.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
parent 43c3cebb
...@@ -3491,8 +3491,7 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska) ...@@ -3491,8 +3491,7 @@ static int matroska_parse_cluster(MatroskaDemuxContext *matroska)
int is_keyframe = blocks[i].non_simple ? blocks[i].reference == INT64_MIN : -1; int is_keyframe = blocks[i].non_simple ? blocks[i].reference == INT64_MIN : -1;
uint8_t* additional = blocks[i].additional.size > 0 ? uint8_t* additional = blocks[i].additional.size > 0 ?
blocks[i].additional.data : NULL; blocks[i].additional.data : NULL;
if (!blocks[i].non_simple)
blocks[i].duration = 0;
res = matroska_parse_block(matroska, blocks[i].bin.buf, blocks[i].bin.data, res = matroska_parse_block(matroska, blocks[i].bin.buf, blocks[i].bin.data,
blocks[i].bin.size, blocks[i].bin.pos, blocks[i].bin.size, blocks[i].bin.pos,
matroska->current_cluster.timecode, matroska->current_cluster.timecode,
......
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