From 4526077c616861018cfb3dc8a1cb4b7811148986 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 14 Aug 2004 12:45:07 +0000 Subject: [PATCH] removed lame warning "strange error flushing buffer". --- lib/modules/swfsound.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/modules/swfsound.c b/lib/modules/swfsound.c index a7ca0e1..935814c 100644 --- a/lib/modules/swfsound.c +++ b/lib/modules/swfsound.c @@ -87,10 +87,15 @@ int swf_mp3_bitrate = 32; #ifdef HAVE_LAME #define HAVE_SOUND +#include #include "../lame/lame.h" static lame_global_flags*lame_flags; +void null_errorf(const char *format, va_list ap) +{ +} + static void initlame() { unsigned char buf[4096]; @@ -116,12 +121,14 @@ static void initlame() lame_init_params(lame_flags); lame_init_bitstream(lame_flags); + lame_set_errorf(lame_flags, null_errorf); /* The first two flush calls to lame always fail, for some reason. Do them here where they cause no damage. */ lame_encode_flush_nogap(lame_flags, buf, bufsize); //printf("init:flush_nogap():%d\n", len); lame_encode_flush(lame_flags, buf, bufsize); //printf("init:flush():%d\n", len); + lame_set_errorf(lame_flags, 0); } void swf_SetSoundStreamHead(TAG*tag, int avgnumsamples) -- 1.7.10.4