[FFmpeg-cvslog] swresample: Fix swr_drop_output so it does not flush the buffers

Michael Niedermayer git at videolan.org
Tue Nov 4 19:03:15 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov  4 16:54:14 2014 +0100| [e4f8a973aa8bdcd8a0d0cc9ed376fc8a8748ef34] | committer: Michael Niedermayer

swresample: Fix swr_drop_output so it does not flush the buffers

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

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

 libswresample/swresample.c   |    3 ++-
 tests/fate/libswresample.mak |   16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index b4d8f32..b0bd697 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -752,13 +752,14 @@ int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_coun
 }
 
 int swr_drop_output(struct SwrContext *s, int count){
+    const uint8_t *tmp_arg[SWR_CH_MAX];
     s->drop_output += count;
 
     if(s->drop_output <= 0)
         return 0;
 
     av_log(s, AV_LOG_VERBOSE, "discarding %d audio samples\n", count);
-    return swr_convert(s, NULL, s->drop_output, NULL, 0);
+    return swr_convert(s, NULL, s->drop_output, tmp_arg, 0);
 }
 
 int swr_inject_silence(struct SwrContext *s, int count){
diff --git a/tests/fate/libswresample.mak b/tests/fate/libswresample.mak
index 3b479a9..24b7d66 100644
--- a/tests/fate/libswresample.mak
+++ b/tests/fate/libswresample.mak
@@ -365,17 +365,17 @@ fate-swr-resample_async-$(3)-$(1)-$(2): FUZZ = 0.1
 fate-swr-resample_async-$(3)-$(1)-$(2): REF = tests/data/asynth-$(1)-1.wav
 endef
 
-fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4047.25
-fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20132
+fate-swr-resample_async-fltp-44100-8000: CMP_TARGET = 4031.60
+fate-swr-resample_async-fltp-44100-8000: SIZE_TOLERANCE = 529200 - 20310
 
-fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11193.77
-fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20312
+fate-swr-resample_async-fltp-8000-44100: CMP_TARGET = 11185.34
+fate-swr-resample_async-fltp-8000-44100: SIZE_TOLERANCE = 96000 - 20344
 
-fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4047.24
-fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20132
+fate-swr-resample_async-s16p-44100-8000: CMP_TARGET = 4031.59
+fate-swr-resample_async-s16p-44100-8000: SIZE_TOLERANCE = 529200 - 20310
 
-fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11194.08
-fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20312
+fate-swr-resample_async-s16p-8000-44100: CMP_TARGET = 11185.65
+fate-swr-resample_async-s16p-8000-44100: SIZE_TOLERANCE = 96000 - 20344
 
 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s16p,s16le,s16)
 $(call CROSS_TEST,$(SAMPLERATES),ARESAMPLE,s32p,s32le,s16)



More information about the ffmpeg-cvslog mailing list