X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libswresample%2Fresample.c;h=8635bf1bed41ca85b2c85e1e55abe10f3b37bc47;hb=966c5c7bb8bad6fef3efce935b943d05ccea0eaa;hp=b834248167bb07414f9517c61f7e11bcb270ad7d;hpb=3e5e5bdfef07526aa5c6b15e0484bdc51289cad9;p=ffmpeg diff --git a/libswresample/resample.c b/libswresample/resample.c index b834248167b..8635bf1bed4 100644 --- a/libswresample/resample.c +++ b/libswresample/resample.c @@ -149,6 +149,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap double *tab = av_malloc_array(tap_count+1, sizeof(*tab)); double *sin_lut = av_malloc_array(ph_nb, sizeof(*sin_lut)); const int center= (tap_count-1)/2; + int ret = AVERROR(ENOMEM); if (!tab || !sin_lut) goto fail; @@ -292,10 +293,11 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap } #endif + ret = 0; fail: av_free(tab); av_free(sin_lut); - return 0; + return ret; } static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,