Further changes for images without c-l headers or termination patterns.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@986 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
3411f10f82
commit
6c2f44af40
|
@ -426,6 +426,7 @@ int RemoteCamera::GetResponse()
|
|||
return( -1 );
|
||||
}
|
||||
}
|
||||
Debug( 3, ( "Got end of image by length, content-length = %d", content_length ));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -455,10 +456,18 @@ int RemoteCamera::GetResponse()
|
|||
content_expr = new RegExpr( content_pattern, PCRE_DOTALL );
|
||||
}
|
||||
}
|
||||
if ( buffer_len )
|
||||
{
|
||||
if ( content_expr->Match( buffer, buffer.Size() ) == 2 )
|
||||
{
|
||||
content_length = content_expr->MatchLength( 1 );
|
||||
Debug( 3, ( "Got end of image, content-length = %d", content_length ));
|
||||
Debug( 3, ( "Got end of image by pattern, content-length = %d", content_length ));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content_length = buffer.Size();
|
||||
Debug( 3, ( "Got end of image by closure, content-length = %d", content_length ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue