From e0c71283023163dc6431f000cdb5a661b05beae0 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 25 Mar 2012 11:48:09 +0200 Subject: [PATCH] swr: fix segfault when 0 out size is used. Signed-off-by: Michael Niedermayer --- libswresample/swresample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 1a384aab13..eb83aa2934 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -527,7 +527,7 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun out_count= resample(s, preout, out_count, midbuf, in_count); } - if(preout != out){ + if(preout != out && out_count){ //FIXME packed doesnt need more than 1 chan here! swri_audio_convert(s->out_convert, out, preout, out_count); }