mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
Fixes: CID1503078 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7a0ea15c7a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8762af5366
commit
e3dd030ef8
@ -197,8 +197,11 @@ FF_DISABLE_DEPRECATION_WARNINGS
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
ret = av_channel_layout_copy(&outsamplesref->ch_layout, &outlink->ch_layout);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
av_frame_free(&outsamplesref);
|
||||
av_frame_free(&insamplesref);
|
||||
return ret;
|
||||
}
|
||||
outsamplesref->sample_rate = outlink->sample_rate;
|
||||
|
||||
if(insamplesref->pts != AV_NOPTS_VALUE) {
|
||||
|
Loading…
Reference in New Issue
Block a user