swresample/swresample: fix sample drop loop end condition
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 23:08:20 +0000 (01:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 23:31:16 +0000 (01:31 +0200)
Fixes Ticket3985

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f9fefa499f0af48f47ea73c8ce0b25df0976c315)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c

index 91baca6..bba628b 100644 (file)
@@ -639,6 +639,8 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
         in_count = 0;
         if(ret>0) {
             s->drop_output -= ret;
+            if (!s->drop_output && !out_arg)
+                return 0;
             continue;
         }