| 313 | } |
| 314 | |
| 315 | bool ReadAMFNumber(double* val, AMFInputStream* stream) { |
| 316 | uint8_t marker; |
| 317 | if (stream->cut_u8(&marker) != 1u) { |
| 318 | LOG(ERROR) << "stream is not long enough"; |
| 319 | return false; |
| 320 | } |
| 321 | if ((AMFMarker)marker == AMF_MARKER_NUMBER) { |
| 322 | if (stream->cut_u64((uint64_t*)val) != 8u) { |
| 323 | LOG(ERROR) << "stream is not long enough"; |
| 324 | return false; |
| 325 | } |
| 326 | return true; |
| 327 | } |
| 328 | LOG(ERROR) << "Expected number, actually " << marker2str(marker); |
| 329 | return false; |
| 330 | } |
| 331 | |
| 332 | bool ReadAMFUint32(uint32_t* val, AMFInputStream* stream) { |
| 333 | double d; |
no test coverage detected