mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-16 12:50:00 +01:00
fix bugs
This commit is contained in:
@@ -82,8 +82,8 @@ static int sock_connect(const char *name, int port) {
|
|||||||
vj_sock_t *alloc_sock_t(void)
|
vj_sock_t *alloc_sock_t(void)
|
||||||
{
|
{
|
||||||
vj_sock_t *s = (vj_sock_t*) malloc(sizeof(vj_sock_t));
|
vj_sock_t *s = (vj_sock_t*) malloc(sizeof(vj_sock_t));
|
||||||
memset( s, 0, sizeof(vj_sock_t));
|
|
||||||
if(!s) return NULL;
|
if(!s) return NULL;
|
||||||
|
memset( s, 0, sizeof(vj_sock_t));
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ static int cache_locate_slot( cache_t *v, long frame_num)
|
|||||||
|
|
||||||
void *init_cache( unsigned int n_slots )
|
void *init_cache( unsigned int n_slots )
|
||||||
{
|
{
|
||||||
if(n_slots <= 0)
|
if(n_slots == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
cache_t *v = (cache_t*) vj_calloc(sizeof(cache_t));
|
cache_t *v = (cache_t*) vj_calloc(sizeof(cache_t));
|
||||||
v->len = n_slots;
|
v->len = n_slots;
|
||||||
|
|||||||
@@ -86,7 +86,10 @@ vj_dv1394 *vj_dv1394_init(void *e, int channel, int quality)
|
|||||||
}
|
}
|
||||||
|
|
||||||
vj_dv1394 *v = (vj_dv1394*)vj_malloc(sizeof(vj_dv1394));
|
vj_dv1394 *v = (vj_dv1394*)vj_malloc(sizeof(vj_dv1394));
|
||||||
|
if(!v) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
v->map_size = (el->video_norm == 'p' ? DV_PAL_SIZE: DV_NTSC_SIZE);
|
v->map_size = (el->video_norm == 'p' ? DV_PAL_SIZE: DV_NTSC_SIZE);
|
||||||
v->handle = -1;
|
v->handle = -1;
|
||||||
v->width = el->video_width;
|
v->width = el->video_width;
|
||||||
|
|||||||
@@ -316,9 +316,9 @@ static void osc_add_client(void *context, int arglen, const void *vargs, OSCTime
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char port[6];
|
char port[6];
|
||||||
snprintf( port, sizeof(port-1), "%d", args[0] );
|
snprintf( port, sizeof(port), "%d", args[0] );
|
||||||
char name[1024];
|
char name[1024];
|
||||||
snprintf(name, sizeof(name)-1, "%s:%s", str,port );
|
snprintf(name, sizeof(name), "%s:%s", str,port );
|
||||||
char *cmd = "/status";
|
char *cmd = "/status";
|
||||||
char *nptr = name;
|
char *nptr = name;
|
||||||
if( osc_has_connection( name ) ) {
|
if( osc_has_connection( name ) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user