Browse Source

af_aresample: fix leak on alloc failure

Fixes CID733798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
9ba2484ece
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavfilter/af_aresample.c

+ 4
- 2
libavfilter/af_aresample.c View File

@@ -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…
Cancel
Save