fix some network bugs; send image over other socket

This commit is contained in:
2023-04-05 18:21:26 +03:00
parent 8b6e7435e0
commit 070df2be89
11 changed files with 228 additions and 148 deletions

View File

@@ -872,6 +872,7 @@ int ccdcaptured(IMG **imgptr){
frameformat fmt = camera->geometry;
int raw_width = fmt.w / GP->hbin, raw_height = fmt.h / GP->vbin;
IMG *ima = NULL;
if(*imgptr && ((*imgptr)->w != raw_width || (*imgptr)->h != raw_height)) FREE(*imgptr);
if(!*imgptr){
uint16_t *img = MALLOC(uint16_t, raw_width * raw_height);
DBG("\n\nAllocated image 2x%dx%d=%d", raw_width, raw_height, 2 * raw_width * raw_height);