Hunting a malloc/free memory problem
This commit is contained in:
parent
3f6b6f73a3
commit
59ba152e36
@ -15,12 +15,16 @@ warn_opts="-Wall"
|
|||||||
fifo_source="cdrskin/cdrfifo.c"
|
fifo_source="cdrskin/cdrfifo.c"
|
||||||
compile_cdrskin=1
|
compile_cdrskin=1
|
||||||
compile_cdrfifo=0
|
compile_cdrfifo=0
|
||||||
|
compile_dewav=0
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
if test "$i" = "-compile_cdrfifo"
|
if test "$i" = "-compile_cdrfifo"
|
||||||
then
|
then
|
||||||
compile_cdrfifo=1
|
compile_cdrfifo=1
|
||||||
|
elif test "$i" = "-compile_dewav"
|
||||||
|
then
|
||||||
|
compile_dewav=1
|
||||||
elif test "$i" = "-cvs_A60220"
|
elif test "$i" = "-cvs_A60220"
|
||||||
then
|
then
|
||||||
libvers="-DCdrskin_libburn_cvs_A60220_tS"
|
libvers="-DCdrskin_libburn_cvs_A60220_tS"
|
||||||
@ -65,6 +69,7 @@ do
|
|||||||
echo "cdrskin/compile_cdrskin.sh : to be executed within ./cdrskin-0.1.3.0.2.ts"
|
echo "cdrskin/compile_cdrskin.sh : to be executed within ./cdrskin-0.1.3.0.2.ts"
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
||||||
|
echo " -compile_dewav compile program test/dewav without libburn."
|
||||||
echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006."
|
echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006."
|
||||||
echo " -libburn_0_2_2 set macro to match libburn-0.2.2"
|
echo " -libburn_0_2_2 set macro to match libburn-0.2.2"
|
||||||
echo " -libburn_0_2_3 set macro to match current libburn-SVN."
|
echo " -libburn_0_2_3 set macro to match current libburn-SVN."
|
||||||
@ -159,6 +164,30 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$compile_dewav" = 1
|
||||||
|
then
|
||||||
|
echo "compiling program test/dewav.c -DDewav_without_libburN $static_opts $debug_opts"
|
||||||
|
cc $static_opts $debug_opts \
|
||||||
|
-DDewav_without_libburN \
|
||||||
|
-o test/dewav \
|
||||||
|
test/dewav.c \
|
||||||
|
libburn/libdax_audioxtr.o \
|
||||||
|
libburn/libdax_msgs.o \
|
||||||
|
\
|
||||||
|
-lpthread
|
||||||
|
|
||||||
|
ret=$?
|
||||||
|
if test "$ret" = 0
|
||||||
|
then
|
||||||
|
dummy=dummy
|
||||||
|
else
|
||||||
|
echo >&2
|
||||||
|
echo "+++ FATAL : Compilation of test/dewav failed" >&2
|
||||||
|
echo >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test "$do_strip" = 1
|
if test "$do_strip" = 1
|
||||||
then
|
then
|
||||||
echo "stripping result cdrskin/cdrskin"
|
echo "stripping result cdrskin/cdrskin"
|
||||||
|
@ -15,10 +15,19 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#ifdef Dewav_without_libburN
|
||||||
|
|
||||||
|
#include "../libburn/libdax_msgs.h"
|
||||||
|
struct libdax_msgs *libdax_messenger= NULL;
|
||||||
|
|
||||||
|
#else /* Dewav_without_libburN */
|
||||||
|
|
||||||
/* The API of libburn */
|
/* The API of libburn */
|
||||||
#include "../libburn/libburn.h"
|
#include "../libburn/libburn.h"
|
||||||
|
|
||||||
|
#endif /* ! Dewav_without_libburN */
|
||||||
|
|
||||||
|
|
||||||
/* The API extension for .wav extraction */
|
/* The API extension for .wav extraction */
|
||||||
#include "../libburn/libdax_audioxtr.h"
|
#include "../libburn/libdax_audioxtr.h"
|
||||||
|
|
||||||
@ -75,6 +84,19 @@ help:;
|
|||||||
in_path= "-";
|
in_path= "-";
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef Dewav_without_libburN
|
||||||
|
|
||||||
|
ret= libdax_msgs_new(&libdax_messenger,0);
|
||||||
|
if(ret<=0) {
|
||||||
|
fprintf(stderr,"Failed to create libdax_messenger object.\n");
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
|
libdax_msgs_set_severities(libdax_messenger, LIBDAX_MSGS_SEV_NEVER,
|
||||||
|
LIBDAX_MSGS_SEV_NOTE, "", 0);
|
||||||
|
fprintf(stderr, "dewav on libdax\n");
|
||||||
|
|
||||||
|
#else /* Dewav_without_libburN */
|
||||||
|
|
||||||
/* Initialize libburn and set up messaging system */
|
/* Initialize libburn and set up messaging system */
|
||||||
if(burn_initialize() == 0) {
|
if(burn_initialize() == 0) {
|
||||||
fprintf(stderr,"Failed to initialize libburn.\n");
|
fprintf(stderr,"Failed to initialize libburn.\n");
|
||||||
@ -82,6 +104,9 @@ help:;
|
|||||||
}
|
}
|
||||||
/* Print messages of severity NOTE or more directly to stderr */
|
/* Print messages of severity NOTE or more directly to stderr */
|
||||||
burn_msgs_set_severities("NEVER", "NOTE", "");
|
burn_msgs_set_severities("NEVER", "NOTE", "");
|
||||||
|
fprintf(stderr, "dewav on libburn\n");
|
||||||
|
|
||||||
|
#endif /* ! Dewav_without_libburN */
|
||||||
|
|
||||||
|
|
||||||
/* Open audio source and create extractor object */
|
/* Open audio source and create extractor object */
|
||||||
@ -134,6 +159,16 @@ help:;
|
|||||||
if(out_fd>2)
|
if(out_fd>2)
|
||||||
close(out_fd);
|
close(out_fd);
|
||||||
libdax_audioxtr_destroy(&xtr, 0);
|
libdax_audioxtr_destroy(&xtr, 0);
|
||||||
|
|
||||||
|
#ifdef Dewav_without_libburN
|
||||||
|
|
||||||
|
libdax_msgs_destroy(&libdax_messenger,0);
|
||||||
|
|
||||||
|
#else /* Dewav_without_libburN */
|
||||||
|
|
||||||
burn_finish();
|
burn_finish();
|
||||||
|
|
||||||
|
#endif /* ! Dewav_without_libburN */
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user