Re: [FFmpeg-devel] [PATCH] swresample/resample: fix return value of build_filter

2016-10-18 Thread Muhammad Faiz
On 10/18/16, Michael Niedermayer  wrote:
> On Tue, Oct 18, 2016 at 02:17:49PM +0700, Muhammad Faiz wrote:
>> return AVERROR code on error
>>
>> Signed-off-by: Muhammad Faiz 
>> ---
>>  libswresample/resample.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> LGTM
>
> thx
>

applied

thanks
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] swresample/resample: fix return value of build_filter

2016-10-18 Thread Michael Niedermayer
On Tue, Oct 18, 2016 at 02:17:49PM +0700, Muhammad Faiz wrote:
> return AVERROR code on error
> 
> Signed-off-by: Muhammad Faiz 
> ---
>  libswresample/resample.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

LGTM

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Never trust a computer, one day, it may think you are the virus. -- Compn


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] swresample/resample: fix return value of build_filter

2016-10-18 Thread Muhammad Faiz
return AVERROR code on error

Signed-off-by: Muhammad Faiz 
---
 libswresample/resample.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libswresample/resample.c b/libswresample/resample.c
index b834248..8635bf1 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,
-- 
2.5.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel