1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

swresample: replace 2 av_free() by av_freep()

avoids leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-16 22:44:15 +02:00
parent c051d668b5
commit 9078b40d35
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r
return c;
error:
av_free(c->filter_bank);
av_freep(&c->filter_bank);
av_free(c);
return NULL;
}

View File

@ -468,7 +468,7 @@ int swri_realloc_audio(AudioData *a, int count){
if(a->planar) memcpy(a->ch[i], old.ch[i], a->count*a->bps);
}
if(!a->planar) memcpy(a->ch[0], old.ch[0], a->count*a->ch_count*a->bps);
av_free(old.data);
av_freep(&old.data);
a->count= count;
return 1;