]> git.basschouten.com Git - openhab-addons.git/commitdiff
Fix bug where port numbers in URL stop MJPEG from working (#17551)
authorMatthew Skinner <matt@pcmus.com>
Sun, 13 Oct 2024 05:50:19 +0000 (16:50 +1100)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2024 05:50:19 +0000 (07:50 +0200)
Signed-off-by: Matthew Skinner <matt@pcmus.com>
bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java

index 70223f7b5effa4fb77c171c043ca1872873e9694..9707ae0ec748ca9f4cf05f38196152d768063997 100644 (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);