Fix bug where port numbers in URL stop MJPEG from working (#17551)

Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
Matthew Skinner 2024-10-13 16:50:19 +11:00 committed by GitHub
parent 949289f238
commit a03ed48d01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,7 +266,7 @@ public class IpCameraHandler extends BaseThingHandler {
}
}
if (msg instanceof HttpContent content) {
if (mjpegUri.equals(requestUrl) && !(content instanceof LastHttpContent)) {
if (mjpegUri.endsWith(requestUrl) && !(content instanceof LastHttpContent)) {
// multiple MJPEG stream packets come back as this.
byte[] chunkedFrame = new byte[content.content().readableBytes()];
content.content().getBytes(content.content().readerIndex(), chunkedFrame);