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
|
--- bits.h
+++ bits.h 2003-10-20 22:04:30.000000000 +0000
@@ -15,4 +15,4 @@
int seek_sync(unsigned int sync, int N);
unsigned int look_ahead(int N);
-
+#define strlwr(x)
--- bbainfo.cpp
+++ bbainfo.cpp 2003-10-20 22:19:15.000000000 +0000
@@ -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++;
--- bbinfo.cpp
+++ bbinfo.cpp 2003-10-20 22:16:43.000000000 +0000
@@ -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;
--- Makefile
+++ Makefile 2003-10-20 22:26:07.000000000 +0000
@@ -0,0 +1,25 @@
+all: bbainfo bbdmux bbinfo bbvinfo
+
+bbdmux: bits.o bbdmux.o
+ $(CXX) $(CXXFLAGS) -lm -o $@ $^
+
+bbinfo: bits.o bbinfo.o
+ $(CXX) $(CXXFLAGS) -lm -o $@ $^
+
+bbvinfo: bits.o bbvinfo.o
+ $(CXX) $(CXXFLAGS) -lm -o $@ $^
+
+bbainfo: bits.o bbainfo.o
+ $(CXX) $(CXXFLAGS) -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
|