try {
byte[] data = new byte[bytesPerFrame];
int count = fileStream.read(data);
- log("# of bytes read = " + count);
+ if (count != bytesPerFrame) {
+ log("Expected to read " + bytesPerFrame + " bytes per frame but read " + count);
+ }
return Optional.of(VideoFrame.of(data, config));
} catch (IOException e) {
e.printStackTrace();