another mjpeg fix

This commit is contained in:
Roberto De Ioris
2013-12-01 05:44:36 +01:00
parent cc3e43eb3d
commit bfd699dac5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ int64_t uwsgi_sharedarea_read(int id, uint64_t pos, char *blob, uint64_t len) {
if (!sa) return -1;
if (pos + len > sa->max_pos + 1) return -1;
if (len == 0) len = (sa->max_pos + 1) - pos;
if (sa->honour_used) len = sa->used-pos;
if (sa->honour_used && sa->used-pos < len) len = sa->used-pos ;
uwsgi_rlock(sa->lock);
memcpy(blob, sa->area + pos, len);
sa->hits++;
+2 -2
View File
@@ -10,7 +10,7 @@ def application(env, start_response):
('Cache-Control', 'no-cache'),
('Cache-Control', 'private'),
('Pragma', 'no-cache'),
('Content-Type', 'multipart/x-mixed-replace; boundary=--' + boundary),
('Content-Type', 'multipart/x-mixed-replace; boundary=' + boundary),
]
)
@@ -21,5 +21,5 @@ def application(env, start_response):
print os.system('screencapture -t jpg -m -T 1 screenshot.jpg')
f = open('screenshot.jpg')
yield env['wsgi.file_wrapper'](f)
yield "--%s\r\n" % boundary
yield "\r\n--%s\r\n" % boundary
#os.system('./isightcapture -w 640 -h 480 screenshot.jpg')