X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fwmavoice.c;h=3f86d0da3578bb054238c5fdeaff79c0128fc3dc;hb=c9cd990dcc8e3bdfb3be8eacd6ce62e1da8b4077;hp=2ec4499981f52a318ec3ad714a4a8367e5b2beba;hpb=bdbf14abba9d1fb99b63cdaabf4bba074a36ea2f;p=ffmpeg diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 2ec4499981f..3f86d0da357 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1756,6 +1756,10 @@ static int synth_superframe(AVCodecContext *ctx, AVFrame *frame, stabilize_lsps(lsps[n], s->lsps); } + /* synth_superframe can run multiple times per packet + * free potential previous frame */ + av_frame_unref(frame); + /* get output buffer */ frame->nb_samples = MAX_SFRAMESIZE; if ((res = ff_get_buffer(ctx, frame, 0)) < 0)