From 72872d020144d9684312e4c3b212a4ff139599ca Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 19 May 2012 18:37:12 +0200 Subject: [PATCH] swr: Fix issue with injecting more data than can be used up in the next call. 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 d8a066f072..4718ce8615 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -667,7 +667,7 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun ret2 += ret; } if(in_count){ - buf_set(&tmp, &s->in_buffer, s->in_buffer_index); + buf_set(&tmp, &s->in_buffer, s->in_buffer_index + s->in_buffer_count); copy(&tmp, in, in_count); s->in_buffer_count += in_count; }