[xiph-cvs] cvs commit: ices/src reencode.c
Brendan
brendan at xiph.org
Thu Mar 13 12:51:37 PST 2003
brendan 03/03/13 15:51:37
Modified: . configure.ac
src reencode.c
Log:
lame_decode_exit added back in, with autoconf glue
Revision Changes Path
1.5 +3 -1 ices/configure.ac
Index: configure.ac
===================================================================
RCS file: /cvs/ice/ices/configure.ac,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- configure.ac 13 Mar 2003 20:32:55 -0000 1.4
+++ configure.ac 13 Mar 2003 20:51:36 -0000 1.5
@@ -1,5 +1,5 @@
# configure script for ices
-# $Id: configure.ac,v 1.4 2003/03/13 20:32:55 brendan Exp $
+# $Id: configure.ac,v 1.5 2003/03/13 20:51:36 brendan Exp $
m4_define(ICES_MAJOR, 0)
m4_define(ICES_MINOR, 2)
@@ -279,6 +279,8 @@
LIBS="$LIBS -lmp3lame"
LIBM="-lm"
AC_DEFINE(HAVE_LIBLAME, 1, [Define if you have the LAME MP3 library])
+
+ AC_CHECK_FUNCS([lame_decode_exit])
], [have_LAME="no"], -lm)
fi
fi
<p><p>1.20 +19 -5 ices/src/reencode.c
Index: reencode.c
===================================================================
RCS file: /cvs/ice/ices/src/reencode.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- reencode.c 13 Mar 2003 19:32:22 -0000 1.19
+++ reencode.c 13 Mar 2003 20:51:36 -0000 1.20
@@ -48,11 +48,6 @@
if (! ices_config.reencode)
return;
- if (lame_decode_init () < 0) {
- ices_log ("LAME: error initialising decoder");
- ices_setup_shutdown ();
- }
-
ices_log_debug ("Using LAME version %s\n", get_lame_version ());
}
@@ -63,6 +58,25 @@
{
ices_stream_t* stream;
lame_global_flags* lame;
+ static int init_decoder = 1;
+
+#ifdef HAVE_LAME_DECODE_EXIT
+ if (!init_decoder) {
+ if (lame_decode_exit () < 0) {
+ ices_log ("LAME: error shutting down decoder");
+ ices_setup_shutdown ();
+ }
+ init_decoder = 1;
+ }
+#endif
+
+ if (init_decoder) {
+ if (lame_decode_init () < 0) {
+ ices_log ("LAME: error initialising decoder");
+ ices_setup_shutdown ();
+ }
+ init_decoder = 0;
+ }
for (stream = ices_config.streams; stream; stream = stream->next) {
if (! stream->reencode)
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list