Commit 9078b40d authored by Michael Niedermayer's avatar Michael Niedermayer

swresample: replace 2 av_free() by av_freep()

avoids leaving stale pointers in memory
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c051d668
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment