diff --git a/airsonic-main/src/main/java/org/airsonic/player/controller/StreamController.java b/airsonic-main/src/main/java/org/airsonic/player/controller/StreamController.java index 29dbb31c..e5ae6dee 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/controller/StreamController.java +++ b/airsonic-main/src/main/java/org/airsonic/player/controller/StreamController.java @@ -255,6 +255,12 @@ public class StreamController { sendDummyDelayed(buf, out); } } 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); bytesWritten += n; }