mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
af_aresample: fix leak on alloc failure
Fixes CID733798 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7457da3698
commit
9ba2484ece
@ -49,8 +49,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
|
||||
|
||||
aresample->next_pts = AV_NOPTS_VALUE;
|
||||
aresample->swr = swr_alloc();
|
||||
if (!aresample->swr)
|
||||
return AVERROR(ENOMEM);
|
||||
if (!aresample->swr) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (args) {
|
||||
char *ptr=argd, *token;
|
||||
|
Loading…
Reference in New Issue
Block a user