mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +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:
commit
ba5e77814e
@ -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));
|
entries = av_realloc_array(entries, seekhead->num_entries + 1, sizeof(mkv_seekhead_entry));
|
||||||
if (entries == NULL)
|
if (entries == NULL)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
entries[seekhead->num_entries ].elementid = elementid;
|
|
||||||
entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
|
|
||||||
|
|
||||||
seekhead->entries = entries;
|
seekhead->entries = entries;
|
||||||
|
|
||||||
|
seekhead->entries[seekhead->num_entries].elementid = elementid;
|
||||||
|
seekhead->entries[seekhead->num_entries++].segmentpos = filepos - seekhead->segment_offset;
|
||||||
|
|
||||||
return 0;
|
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));
|
entries = av_realloc_array(entries, cues->num_entries + 1, sizeof(mkv_cuepoint));
|
||||||
if (entries == NULL)
|
if (entries == NULL)
|
||||||
return AVERROR(ENOMEM);
|
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 = 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user