[FFmpeg-cvslog] swr: Fix partial flushing.

Michael Niedermayer git at videolan.org
Sun Mar 25 06:54:11 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 25 05:58:31 2012 +0200| [8b11ae8a9a3c88dee475477a0c6fcd17c970efcc] | committer: Michael Niedermayer

swr: Fix partial flushing.

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

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

 libswresample/swresample.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 5ce377f..1a384aa 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -160,6 +160,8 @@ int swr_init(struct SwrContext *s){
     swri_audio_convert_free(&s->out_convert);
     swri_audio_convert_free(&s->full_convert);
 
+    s->flushed = 0;
+
     s-> in.planar= av_sample_fmt_is_planar(s-> in_sample_fmt);
     s->out.planar= av_sample_fmt_is_planar(s->out_sample_fmt);
     s-> in_sample_fmt= av_get_alt_sample_fmt(s-> in_sample_fmt, 0);
@@ -529,8 +531,6 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
 //FIXME packed doesnt need more than 1 chan here!
         swri_audio_convert(s->out_convert, out, preout, out_count);
     }
-    if(!in_arg)
-        s->in_buffer_count = 0;
     return out_count;
 }
 



More information about the ffmpeg-cvslog mailing list