Commit ba5e7781 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring

Conflicts:
	libavformat/matroskaenc.c

Mostly not merged as the buggy code was no longer part of FFmpeg
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 52ed1d6d 00a63bfb
......@@ -310,11 +310,11 @@ static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, unsigned int elementid
entries = av_realloc_array(entries, seekhead->num_entries + 1, sizeof(mkv_seekhead_entry));
if (entries == NULL)
return AVERROR(ENOMEM);
seekhead->entries = entries;
entries[seekhead->num_entries ].elementid = elementid;
entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
seekhead->entries[seekhead->num_entries].elementid = elementid;
seekhead->entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
seekhead->entries = entries;
return 0;
}
......@@ -391,13 +391,13 @@ static int mkv_add_cuepoint(mkv_cues *cues, int stream, int64_t ts, int64_t clus
entries = av_realloc_array(entries, cues->num_entries + 1, sizeof(mkv_cuepoint));
if (entries == NULL)
return AVERROR(ENOMEM);
cues->entries = entries;
entries[cues->num_entries ].pts = ts;
entries[cues->num_entries ].tracknum = stream + 1;
entries[cues->num_entries ].cluster_pos = cluster_pos - cues->segment_offset;
entries[cues->num_entries++].relative_pos = relative_pos;
cues->entries[cues->num_entries].pts = ts;
cues->entries[cues->num_entries].tracknum = stream + 1;
cues->entries[cues->num_entries].cluster_pos = cluster_pos - cues->segment_offset;
cues->entries[cues->num_entries++].relative_pos= relative_pos;
cues->entries = entries;
return 0;
}
......
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