Changes for review
This commit is contained in:
parent
398cbe9284
commit
a7fbe05a73
22 changed files with 182 additions and 350 deletions
|
|
@ -158,7 +158,7 @@ public class OggFromWebMWriter implements Closeable {
|
|||
switch (webm_track.kind) {
|
||||
case Audio:
|
||||
resolution = getSampleFrequencyFromTrack(webm_track.bMetadata);
|
||||
if (resolution == 0f) {
|
||||
if (resolution == 0.0f) {
|
||||
throw new RuntimeException("cannot get the audio sample rate");
|
||||
}
|
||||
break;
|
||||
|
|
@ -167,7 +167,7 @@ public class OggFromWebMWriter implements Closeable {
|
|||
if (webm_track.defaultDuration == 0) {
|
||||
throw new RuntimeException("missing default frame time");
|
||||
}
|
||||
resolution = 1000f / ((float) webm_track.defaultDuration / webm_segment.info.timecodeScale);
|
||||
resolution = 1000.0f / ((float) webm_track.defaultDuration / webm_segment.info.timecodeScale);
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("not implemented");
|
||||
|
|
@ -358,7 +358,7 @@ public class OggFromWebMWriter implements Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
return 0f;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
private void clearSegmentTable() {
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ public class SubtitleConverter {
|
|||
|
||||
time += Integer.parseInt(units[0]) * 3600000;// hours
|
||||
time += Integer.parseInt(units[1]) * 60000;//minutes
|
||||
time += Float.parseFloat(units[2]) * 1000f;// seconds and milliseconds (if present)
|
||||
time += Float.parseFloat(units[2]) * 1000.0f;// seconds and milliseconds (if present)
|
||||
|
||||
// frames and sub-frames are ignored (not implemented)
|
||||
// time += units[3] * fps;
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ public class WebMWriter implements Closeable {
|
|||
|
||||
int offset = withLength ? 1 : 0;
|
||||
byte[] buffer = new byte[offset + length];
|
||||
long marker = (long) Math.floor((length - 1f) / 8f);
|
||||
long marker = (long) Math.floor((length - 1.0f) / 8.0f);
|
||||
|
||||
float mul = 1;
|
||||
for (int i = length - 1; i >= 0; i--, mul *= 0x100) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue