Skip to content

Commit 59926fa

Browse files
committed
Merge pull request #532 from BBBBlarry/master
Rebased: read mjpeg format from TrendNet and Axis cameras
2 parents 664398e + fd064ea commit 59926fa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/java/edu/wpi/grip/core/sources/IPCameraFrameGrabber.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,15 @@ byte[] readImage() throws IOException {
162162
}
163163
}
164164
}
165+
165166
// find embedded jpeg in stream
166-
final String subheader = sb.toString();
167+
final String subheader = sb.toString().toLowerCase();
167168
//log.debug(subheader);
168169

169170
// if (boundryKey == null)
170171
// {
171172
// Yay! - server was nice and sent content length
172-
int c0 = subheader.indexOf("Content-Length: ");
173+
int c0 = subheader.indexOf("content-length: ");
173174
int c1 = subheader.indexOf('\r', c0);
174175

175176
if (c0 < 0) {

0 commit comments

Comments
 (0)