[FFmpeg-cvslog] swr: Fix issue with injecting more data than can be used up in the next call.

Michael Niedermayer git at videolan.org
Sat May 19 19:28:56 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 19 18:37:12 2012 +0200| [72872d020144d9684312e4c3b212a4ff139599ca] | committer: Michael Niedermayer

swr: Fix issue with injecting more data than can be used up in the next call.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72872d020144d9684312e4c3b212a4ff139599ca
---

 libswresample/swresample.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index d8a066f..4718ce8 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;
             }



More information about the ffmpeg-cvslog mailing list