A couple of final tweaks

This commit is contained in:
Oliver Woodman 2015-10-26 11:56:25 +00:00
parent cdad156bae
commit 02d42753ec

View file

@ -77,7 +77,7 @@ import java.util.Map;
// Should never happen. // Should never happen.
return; return;
} }
// Set the duration to the metadata's value, if present. // Set the duration to the value contained in the metadata, if present.
Map<String, Object> metadata = (Map<String, Object>) readAmfData(data, type); Map<String, Object> metadata = (Map<String, Object>) readAmfData(data, type);
if (metadata.containsKey(KEY_DURATION)) { if (metadata.containsKey(KEY_DURATION)) {
double durationSeconds = (double) metadata.get(KEY_DURATION); double durationSeconds = (double) metadata.get(KEY_DURATION);
@ -202,8 +202,8 @@ import java.util.Map;
* @return The value read from the buffer. * @return The value read from the buffer.
*/ */
private Date readAmfDate(ParsableByteArray data) { private Date readAmfDate(ParsableByteArray data) {
final Date date = new Date((long) readAmfDouble(data).doubleValue()); Date date = new Date((long) readAmfDouble(data).doubleValue());
data.readUnsignedShort(); data.readUnsignedShort(); // Skip reserved bytes.
return date; return date;
} }