Added a warning if stream output exceeds predicted size

master
Evan Harris 6 years ago
parent 6cfbe0ff88
commit a6cdba4a44
No known key found for this signature in database
GPG Key ID: FF3BD4DA59FF9EDC
  1. 6
      airsonic-main/src/main/java/org/airsonic/player/controller/StreamController.java

@ -255,6 +255,12 @@ public class StreamController {
sendDummyDelayed(buf, out); sendDummyDelayed(buf, out);
} }
} else { } else {
if (fileLengthExpected != null && bytesWritten <= fileLengthExpected
&& bytesWritten + n > fileLengthExpected) {
LOG.warn("Stream output exceeded expected length of {}. It is likely that "
+ "the transcoder is not adhering to the bitrate limit or the media "
+ "source is corrupted or has grown larger", fileLengthExpected);
}
out.write(buf, 0, n); out.write(buf, 0, n);
bytesWritten += n; bytesWritten += n;
} }

Loading…
Cancel
Save