mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
c051d668b5
commit
9078b40d35
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue