summaryrefslogtreecommitdiff
blob: 98efb8e534de0e956d138a6ae9e48037cf280edb (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
--- a/bits.h
+++ b/bits.h
@@ -15,4 +15,4 @@
 int seek_sync(unsigned int sync, int N);
 unsigned int look_ahead(int N);
 
-
+#define strlwr(x)
--- a/bbainfo.cpp
+++ b/bbainfo.cpp
@@ -97,8 +97,8 @@
 {
   int i, framesize, skip;
 
-  framesize = bitrate_index[3 - layer][bit_rate] /
-              frequency[freq] * slots[3 - layer];
+  framesize = (int) (bitrate_index[3 - layer][bit_rate] /
+              frequency[freq] * slots[3 - layer]);
 
   if (padding_bit)
     framesize++;
--- a/bbinfo.cpp
+++ b/bbinfo.cpp
@@ -984,7 +984,7 @@
                           bit_rate = (k & 0xF0) >> 4;
                           freq = (k & 0x0C) >> 2;
                           padding_bit = (k & 0x02) >> 1;
-                          audio_sync[i] = ((bitrate_index[3 - layer][bit_rate] /
+                          audio_sync[i] = (int) ((bitrate_index[3 - layer][bit_rate] /
                                             frequency[freq]) * slots[3 - layer]) - 4;
                           if (padding_bit)
                             audio_sync[i] += 1;
@@ -1274,7 +1274,7 @@
                           bit_rate = (k & 0xF0) >> 4;
                           freq = (k & 0x0C) >> 2;
                           padding_bit = (k & 0x02) >> 1;
-                          audio_sync[i] = ((bitrate_index[3 - layer][bit_rate] /
+                          audio_sync[i] = (int) ((bitrate_index[3 - layer][bit_rate] /
                                             frequency[freq]) * slots[3 - layer]) - 4;
 
                           if (padding_bit)
@@ -2198,7 +2198,7 @@
                     bit_rate = (k & 0xF0) >> 4;
                     freq = (k & 0x0C) >> 2;
                     padding_bit = (k & 0x02) >> 1;
-                    streams[PID]->audio_sync = ((bitrate_index[3 - layer][bit_rate] /
+                    streams[PID]->audio_sync = (int) ((bitrate_index[3 - layer][bit_rate] /
                                       frequency[freq]) * slots[3 - layer]) - 4;
                     if (padding_bit)
                       streams[PID]->audio_sync += 1;
--- a/Makefile
+++ b/Makefile
@@ -0,0 +1,25 @@
+all: bbainfo bbdmux bbinfo bbvinfo
+
+bbdmux: bits.o bbdmux.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@ 
+
+bbinfo: bits.o bbinfo.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@ 
+
+bbvinfo: bits.o bbvinfo.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@ 
+
+bbainfo: bits.o bbainfo.o
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -lm -o $@ 
+
+%.o: %.c
+	$(CXX) $(CXXFLAGS) -c -o $@ $<
+
+clean:
+	rm -f bbainfo bbdmux bbinfo bbvinfo core *.o
+
+bbainfo.o: bbainfo.cpp bits.h
+bbdmux.o: bbdmux.cpp bits.h
+bbinfo.o: bbinfo.cpp bits.h
+bbvinfo.o: bbvinfo.cpp bits.h
+bits.o: bits.cpp bits.h