diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 15:12:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 15:26:06 +0200 |
commit | ba5e77814e5cb60d8476b831cdb6223cea98a7d4 (patch) | |
tree | 33f117c088439755b9fcbb0a8965e5005b3069d1 /libavformat/matroskaenc.c | |
parent | 52ed1d6d5847bc065ca2ca0378365d008374de49 (diff) | |
parent | 00a63bfb87af6cf7bcdf85848830a90c7e052d41 (diff) | |
download | ffmpeg-ba5e77814e5cb60d8476b831cdb6223cea98a7d4.tar.gz |
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>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 795e47b77e..a14750b968 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -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; } |