1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-12 15:12:52 +02:00
commit ba5e77814e

View File

@ -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);
entries[seekhead->num_entries ].elementid = elementid;
entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
seekhead->entries = entries;
seekhead->entries[seekhead->num_entries].elementid = elementid;
seekhead->entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
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);
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 = entries;
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;
return 0;
}