Index: trunk/cortado/src/com/fluendo/player/DurationScanner.java |
— | — | @@ -105,12 +105,12 @@ |
106 | 106 | |
107 | 107 | while (oy.pageout(og) == 1) { |
108 | 108 | |
109 | | - int serialno = og.serialno(); |
| 109 | + Integer serialno = new Integer(og.serialno()); |
110 | 110 | StreamState os = (StreamState) streamstates.get(serialno); |
111 | 111 | if (os == null) { |
112 | 112 | os = new StreamState(); |
113 | 113 | os.init(og.serialno()); |
114 | | - streamstates.put(og.serialno(), os); |
| 114 | + streamstates.put(serialno, os); |
115 | 115 | System.out.println("DurationScanner: created StreamState for stream no. " + serialno); |
116 | 116 | } |
117 | 117 | |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | |
122 | 122 | Integer type = (Integer) streamtype.get(serialno); |
123 | 123 | if (type == null) { |
124 | | - type = determineType(op); |
| 124 | + type = new Integer(determineType(op)); |
125 | 125 | streamtype.put(serialno, type); |
126 | 126 | if (comment != null) { |
127 | 127 | streamcomment.put(serialno, comment); |
— | — | @@ -128,14 +128,14 @@ |
129 | 129 | if (info != null) { |
130 | 130 | streaminfo.put(serialno, info); |
131 | 131 | } |
132 | | - streamstartgranule.put(serialno, og.granulepos()); |
| 132 | + streamstartgranule.put(serialno, new Long(og.granulepos())); |
133 | 133 | } |
134 | 134 | |
135 | | - switch (type) { |
| 135 | + switch (type.intValue()) { |
136 | 136 | case VORBIS: |
137 | 137 | { |
138 | 138 | com.jcraft.jorbis.Info i = (com.jcraft.jorbis.Info) streaminfo.get(serialno); |
139 | | - long startgranule = (Long) streamstartgranule.get(serialno); |
| 139 | + long startgranule = ((Long) streamstartgranule.get(serialno)).longValue(); |
140 | 140 | float t = (float) (og.granulepos() - startgranule) / i.rate; |
141 | 141 | if (t > time) { |
142 | 142 | time = t; |