[Freeswitch-svn] [commit] r9093 - freeswitch/trunk/src/mod/formats/mod_shout
Freeswitch SVN
anthm at freeswitch.org
Fri Jul 18 13:51:01 EDT 2008
Author: anthm
Date: Fri Jul 18 13:51:01 2008
New Revision: 9093
Modified:
freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c
Log:
add small padding to end of mp3
Modified: freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c (original)
+++ freeswitch/trunk/src/mod/formats/mod_shout/mod_shout.c Fri Jul 18 13:51:01 2008
@@ -86,13 +86,15 @@
if (context->fp) {
unsigned char mp3buffer[8192];
- int16_t blank[1024] = {0}, *r = NULL;
int len;
+ int16_t blank[2048] = {0}, *r = NULL;
+
+ len = lame_encode_buffer(context->gfp, blank, r, sizeof(blank) / 2, mp3buffer, sizeof(mp3buffer));
- if ((len = lame_encode_buffer(context->gfp, blank, r, sizeof(blank) / 2, mp3buffer, sizeof(mp3buffer)))) {
+ if (len) {
ret = fwrite(mp3buffer, 1, len, context->fp);
}
-
+
while ((len = lame_encode_flush(context->gfp, mp3buffer, sizeof(mp3buffer))) > 0) {
ret = fwrite(mp3buffer, 1, len, context->fp);
if (ret < 0) {
More information about the Freeswitch-svn
mailing list