mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
Fixes: CID1503088 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a5c815f937
commit
62d4414d54
@ -246,8 +246,11 @@ static int try_push_frame(AVFilterContext *ctx, int nb_samples)
|
|||||||
av_make_q(1, outlink->sample_rate),
|
av_make_q(1, outlink->sample_rate),
|
||||||
outlink->time_base);
|
outlink->time_base);
|
||||||
|
|
||||||
if ((ret = av_channel_layout_copy(&outbuf->ch_layout, &outlink->ch_layout)) < 0)
|
if ((ret = av_channel_layout_copy(&outbuf->ch_layout, &outlink->ch_layout)) < 0) {
|
||||||
|
free_frames(s->nb_inputs, inbuf);
|
||||||
|
av_frame_free(&outbuf);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
while (nb_samples) {
|
while (nb_samples) {
|
||||||
/* Unroll the most common sample formats: speed +~350% for the loop,
|
/* Unroll the most common sample formats: speed +~350% for the loop,
|
||||||
|
Loading…
Reference in New Issue
Block a user