mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avfilter/f_loop: Fix leak on error
Fixes CID1355117 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
be96ebdcd7
commit
645f7c1ce5
@ -88,8 +88,10 @@ static int push_samples(AVFilterContext *ctx, int nb_samples)
|
|||||||
if (!out)
|
if (!out)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
ret = av_audio_fifo_peek_at(s->fifo, (void **)out->extended_data, out->nb_samples, s->current_sample);
|
ret = av_audio_fifo_peek_at(s->fifo, (void **)out->extended_data, out->nb_samples, s->current_sample);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
av_frame_free(&out);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
out->pts = s->pts;
|
out->pts = s->pts;
|
||||||
out->nb_samples = ret;
|
out->nb_samples = ret;
|
||||||
s->pts += out->nb_samples;
|
s->pts += out->nb_samples;
|
||||||
|
Loading…
Reference in New Issue
Block a user