1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
Index: libmpc/configure.in
===================================================================
--- libmpc.orig/configure.in
+++ libmpc/configure.in
@@ -28,6 +28,12 @@ esac
AC_SUBST([EXTRALIBS])
AC_ARG_ENABLE([mpcchap], [AS_HELP_STRING([--enable-mpcchap], [enable building mpcchap])])
+if test "x$enable_mpcchap" = xyes; then
+ PKG_CHECK_MODULES(LIBCUE, libcue)
+ AC_SUBST(LIBCUE_CFLAGS)
+ AC_SUBST(LIBCUE_LIBS)
+fi
+
AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
Index: libmpc/mpcchap/Makefile.am
===================================================================
--- libmpc.orig/mpcchap/Makefile.am
+++ libmpc/mpcchap/Makefile.am
@@ -4,7 +4,8 @@ bin_PROGRAMS = mpcchap
common_sources = ../common/tags.c ../common/crc32.c
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include \
+ $(LIBCUE_CFLAGS)
if HAVE_VISIBILITY
AM_CFLAGS = -fvisibility=hidden
@@ -16,4 +17,4 @@ dictionary.h iniparser.h
mpcchap_LDADD = $(top_builddir)/libmpcdec/libmpcdec.la \
$(top_builddir)/libmpcenc/libmpcenc.a \
- -lm -lcuefile
+ -lm $(LIBCUE_LIBS)
Index: libmpc/mpcchap/mpcchap.c
===================================================================
--- libmpc.orig/mpcchap/mpcchap.c
+++ libmpc/mpcchap/mpcchap.c
@@ -24,7 +24,7 @@
#include <sys/stat.h>
-#include <cuetools/cuefile.h>
+#include <libcue/libcue.h>
// tags.c
void Init_Tags ( void );
@@ -153,13 +153,13 @@ mpc_status add_chaps_ini(char * mpc_file
mpc_status add_chaps_cue(char * mpc_file, char * chap_file, mpc_demux * demux, mpc_streaminfo * si)
{
Cd *cd = 0;
- int nchap, format = UNKNOWN;
+ int nchap;
struct stat stbuf;
FILE * in_file;
int chap_pos, end_pos, chap_size, i;
char * tmp_buff;
- if (0 == (cd = cf_parse(chap_file, &format))) {
+ if (0 == (cd = cue_parse_file(chap_file))) {
fprintf(stderr, "%s: input file error\n", chap_file);
return !MPC_STATUS_OK;
}
|