Merge commit 'd872fb0f7f'
* commit 'd872fb0f7f':
lavf: Reset the entry count and allocation size variables on av_reallocp failures
Conflicts:
libavformat/avienc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
72eddc10fa
12 changed files with 44 additions and 15 deletions
|
|
@ -567,8 +567,11 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
int id = idx->entry % AVI_INDEX_CLUSTER_SIZE;
|
||||
if (idx->ents_allocated <= idx->entry) {
|
||||
idx->cluster = av_realloc_f(idx->cluster, sizeof(void*), cl+1);
|
||||
if (!idx->cluster)
|
||||
if (!idx->cluster) {
|
||||
idx->ents_allocated = 0;
|
||||
idx->entry = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
idx->cluster[cl] = av_malloc(AVI_INDEX_CLUSTER_SIZE*sizeof(AVIIentry));
|
||||
if (!idx->cluster[cl])
|
||||
return AVERROR(ENOMEM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue