mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-16 21:00:00 +01:00
reduce compile warnings (fix bad indents, buffer sizes, etc)
This commit is contained in:
@@ -276,6 +276,8 @@ lav_file_t *lav_open_output_file(char *filename, char format,
|
|||||||
else
|
else
|
||||||
quicktime_set_video(lav_fd->qt_fd,1, width,height,fps,
|
quicktime_set_video(lav_fd->qt_fd,1, width,height,fps,
|
||||||
QUICKTIME_DV );
|
QUICKTIME_DV );
|
||||||
|
|
||||||
|
|
||||||
if (asize)
|
if (asize)
|
||||||
quicktime_set_audio(lav_fd->qt_fd, achans, arate, asize, QUICKTIME_TWOS);
|
quicktime_set_audio(lav_fd->qt_fd, achans, arate, asize, QUICKTIME_TWOS);
|
||||||
|
|
||||||
@@ -458,6 +460,7 @@ int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps)
|
|||||||
|
|
||||||
for (i = 0; i < channels; i++)
|
for (i = 0; i < channels; i++)
|
||||||
free(qt_audion[i]);
|
free(qt_audion[i]);
|
||||||
|
|
||||||
free(qt_audion);
|
free(qt_audion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1626,6 +1626,7 @@ int sample_set_chain_source(int s1, int position, int input)
|
|||||||
sample = sample_get(s1);
|
sample = sample_get(s1);
|
||||||
if (!sample)
|
if (!sample)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (position < 0 || position >= SAMPLE_MAX_EFFECTS)
|
if (position < 0 || position >= SAMPLE_MAX_EFFECTS)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -1638,6 +1639,7 @@ int sample_set_chain_source(int s1, int position, int input)
|
|||||||
if(second && second->edit_list)
|
if(second && second->edit_list)
|
||||||
vj_el_clear_cache( second->edit_list );
|
vj_el_clear_cache( second->edit_list );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( sample->effect_chain[position]->source_type == 0 &&
|
if( sample->effect_chain[position]->source_type == 0 &&
|
||||||
sample->effect_chain[position]->effect_id > 0 &&
|
sample->effect_chain[position]->effect_id > 0 &&
|
||||||
sample->effect_chain[position]->channel > 0 &&
|
sample->effect_chain[position]->channel > 0 &&
|
||||||
@@ -2531,9 +2533,12 @@ editlist *sample_get_editlist(int s1)
|
|||||||
int sample_cached(sample_info *s, int b_sample )
|
int sample_cached(sample_info *s, int b_sample )
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for( i = 0; i < SAMPLE_MAX_EFFECTS ;i++ )
|
for( i = 0; i < SAMPLE_MAX_EFFECTS ;i++ ) {
|
||||||
if( s->effect_chain[i]->source_type == 0 && s->effect_chain[i]->channel == b_sample)
|
if( s->effect_chain[i]->source_type == 0 && s->effect_chain[i]->channel == b_sample) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -898,8 +898,14 @@ vevo_property_element_size(vevo_port_t * p, const char *key, const int idx )
|
|||||||
\param port_type Type of Port to Create. Port types <= 1024 are typed, > 1024 are anonymous ports.
|
\param port_type Type of Port to Create. Port types <= 1024 are typed, > 1024 are anonymous ports.
|
||||||
\return A New Port
|
\return A New Port
|
||||||
*/
|
*/
|
||||||
|
#ifdef STRICT_CHECKING
|
||||||
|
vevo_port_t *vevo_port_new(int port_type, const char *func, const int line_no)
|
||||||
|
{
|
||||||
|
veejay_msg(VEEJAY_MSG_DEBUG,"New port %d called from %s:%d", port_type, func, line_no);
|
||||||
|
#else
|
||||||
vevo_port_t *vevo_port_new(int port_type)
|
vevo_port_t *vevo_port_new(int port_type)
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
__vevo_port_t *port = (__vevo_port_t *) vj_malloc(sizeof(__vevo_port_t));
|
__vevo_port_t *port = (__vevo_port_t *) vj_malloc(sizeof(__vevo_port_t));
|
||||||
|
|
||||||
port->index = NULL;
|
port->index = NULL;
|
||||||
@@ -998,8 +1004,14 @@ int vevo_port_verify( vevo_port_t *port )
|
|||||||
/*!
|
/*!
|
||||||
\param p Port to destroy
|
\param p Port to destroy
|
||||||
*/
|
*/
|
||||||
|
#ifdef STRICT_CHECKING
|
||||||
|
void vevo_port_free( vevo_port_t *port, const char *func, const int line_no)
|
||||||
|
{
|
||||||
|
veejay_msg(VEEJAY_MSG_DEBUG, "Free port called from %s:%d", func, line_no);
|
||||||
|
#else
|
||||||
void vevo_port_free( vevo_port_t *port )
|
void vevo_port_free( vevo_port_t *port )
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
if(port != NULL) {
|
if(port != NULL) {
|
||||||
vevo_port_free_(port );
|
vevo_port_free_(port );
|
||||||
port = NULL;
|
port = NULL;
|
||||||
@@ -1506,7 +1518,7 @@ void *vevo_port_register( vevo_port_t *in, vevo_port_t *ref )
|
|||||||
void *port = in;
|
void *port = in;
|
||||||
const void *store = ref;
|
const void *store = ref;
|
||||||
if(!port)
|
if(!port)
|
||||||
port = vevo_port_new( VEVO_PORT_POOL );
|
port = vpn( VEVO_PORT_POOL );
|
||||||
char pkey[32];
|
char pkey[32];
|
||||||
if(store)
|
if(store)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ void perspective_free() {
|
|||||||
free(perspective_private_[i] );
|
free(perspective_private_[i] );
|
||||||
perspective_private_[i] = NULL;
|
perspective_private_[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( perspective_vp_ )
|
if( perspective_vp_ )
|
||||||
viewport_destroy( perspective_vp_ );
|
viewport_destroy( perspective_vp_ );
|
||||||
perspective_vp_ = NULL;
|
perspective_vp_ = NULL;
|
||||||
|
|||||||
@@ -130,24 +130,19 @@ void rotozoom_destroy()
|
|||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < 9; j++) {
|
for (j = 0; j < 9; j++) {
|
||||||
if( test_roto[j] )
|
|
||||||
free(test_roto[j]);
|
free(test_roto[j]);
|
||||||
if( test_roto2[j]);
|
|
||||||
free(test_roto2[j]);
|
free(test_roto2[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int rotozoom_malloc(int width, int height)
|
int rotozoom_malloc(int width, int height)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
rotobuffer[0] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height * 3);
|
rotobuffer[0] = (uint8_t *) vj_calloc(sizeof(uint8_t) * width * height * 3);
|
||||||
if(!rotobuffer[0])
|
if(!rotobuffer[0])
|
||||||
return 0;
|
return 0;
|
||||||
rotobuffer[1] = rotobuffer[0] + (width * height);
|
rotobuffer[1] = rotobuffer[0] + (width * height);
|
||||||
rotobuffer[2] = rotobuffer[1] + (width * height);
|
rotobuffer[2] = rotobuffer[1] + (width * height);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rotozoom_free() {
|
void rotozoom_free() {
|
||||||
|
|||||||
@@ -60,12 +60,8 @@ void veejay_set_sample(veejay_t *info, int sample);
|
|||||||
|
|
||||||
int veejay_set_frame(veejay_t *info, long frame_num);
|
int veejay_set_frame(veejay_t *info, long frame_num);
|
||||||
|
|
||||||
#ifdef STRICT_CHECKING
|
|
||||||
#define veejay_change_state(a,b) vcs(a,b,__FUNCTION__,__LINE__)
|
|
||||||
void vcs(veejay_t *info, int new_state,const char *caller_func,const int caller_line);
|
|
||||||
#else
|
|
||||||
void veejay_change_state(veejay_t *info, int new_state);
|
void veejay_change_state(veejay_t *info, int new_state);
|
||||||
#endif
|
|
||||||
int veejay_set_speed(veejay_t *info , int speed);
|
int veejay_set_speed(veejay_t *info , int speed);
|
||||||
|
|
||||||
int veejay_hold_frame(veejay_t *info, int rrp, int pos);
|
int veejay_hold_frame(veejay_t *info, int rrp, int pos);
|
||||||
|
|||||||
@@ -448,11 +448,13 @@ while(*c) { \
|
|||||||
if(__z > _last_known_num_args ) break; \
|
if(__z > _last_known_num_args ) break; \
|
||||||
switch(*c++) {\
|
switch(*c++) {\
|
||||||
case 's':\
|
case 's':\
|
||||||
|
if( b != NULL ) {\
|
||||||
__tmpstr = (char*)va_arg(d,char*);\
|
__tmpstr = (char*)va_arg(d,char*);\
|
||||||
if(__tmpstr != NULL) {\
|
if(__tmpstr != NULL) {\
|
||||||
sprintf( b,"%s",__tmpstr);\
|
sprintf( b,"%s",__tmpstr);\
|
||||||
}\
|
}\
|
||||||
__z++ ;\
|
__z++ ;\
|
||||||
|
}\
|
||||||
break;\
|
break;\
|
||||||
case 'd': a[__z] = *( va_arg(d, int*)); __z++ ;\
|
case 'd': a[__z] = *( va_arg(d, int*)); __z++ ;\
|
||||||
break; }\
|
break; }\
|
||||||
@@ -8233,8 +8235,8 @@ void vj_event_send_sample_info ( void *ptr, const char format[], va_list ap )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(failed) {
|
if(failed) {
|
||||||
s_print_buf = get_print_buf( 8 );
|
s_print_buf = get_print_buf( 9 );
|
||||||
snprintf( s_print_buf,8, "%08d", 0 );
|
snprintf( s_print_buf,9, "%08d", 0 );
|
||||||
}
|
}
|
||||||
SEND_MSG(v , s_print_buf );
|
SEND_MSG(v , s_print_buf );
|
||||||
free(s_print_buf);
|
free(s_print_buf);
|
||||||
@@ -8346,8 +8348,8 @@ void vj_event_get_image_part ( void *ptr, const char format[], va_list ap )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
char header[8];
|
char header[9];
|
||||||
sprintf( header, "%08d",len );
|
snprintf( header, sizeof(header), "%08d",len );
|
||||||
SEND_DATA(v, header, 8 );
|
SEND_DATA(v, header, 8 );
|
||||||
SEND_DATA(v, start_addr, len );
|
SEND_DATA(v, start_addr, len );
|
||||||
free(start_addr);
|
free(start_addr);
|
||||||
@@ -9506,7 +9508,7 @@ void vj_event_send_sample_options ( void *ptr, const char format[], va_list ap )
|
|||||||
|
|
||||||
P_A(args,str,format,ap);
|
P_A(args,str,format,ap);
|
||||||
|
|
||||||
char options[100];
|
char options[256];
|
||||||
char prefix[4];
|
char prefix[4];
|
||||||
|
|
||||||
char *s_print_buf = get_print_buf(128);
|
char *s_print_buf = get_print_buf(128);
|
||||||
|
|||||||
@@ -286,7 +286,9 @@ static void osc_add_client(void *context, int arglen, const void *vargs, OSCTime
|
|||||||
int args[16];
|
int args[16];
|
||||||
int __a = vj_osc_count_int_arguments(arglen,vargs);
|
int __a = vj_osc_count_int_arguments(arglen,vargs);
|
||||||
int __n = vj_osc_parse_char_arguments(arglen,vargs,str);
|
int __n = vj_osc_parse_char_arguments(arglen,vargs,str);
|
||||||
memset( args,0,16 );
|
|
||||||
|
memset( args,0,sizeof(args) );
|
||||||
|
|
||||||
str[__n] = '\0';
|
str[__n] = '\0';
|
||||||
|
|
||||||
vj_osc_parse_int_arguments( arglen , vargs , args );
|
vj_osc_parse_int_arguments( arglen , vargs , args );
|
||||||
@@ -451,8 +453,6 @@ static void osc_iterate_clients()
|
|||||||
|
|
||||||
int res = osc_client_status_send( clnt, cmd );
|
int res = osc_client_status_send( clnt, cmd );
|
||||||
if( res == 0 ) {
|
if( res == 0 ) {
|
||||||
( port );
|
|
||||||
osc_clients[i] = NULL;
|
|
||||||
veejay_msg(VEEJAY_MSG_WARNING,"Failed to send %s",cmd);
|
veejay_msg(VEEJAY_MSG_WARNING,"Failed to send %s",cmd);
|
||||||
}
|
}
|
||||||
free(cmd);
|
free(cmd);
|
||||||
@@ -468,7 +468,8 @@ static void osc_vims_method(void *context, int arglen, const void *vargs, OSCTi
|
|||||||
int args[16];
|
int args[16];
|
||||||
int __a = vj_osc_count_int_arguments(arglen,vargs);
|
int __a = vj_osc_count_int_arguments(arglen,vargs);
|
||||||
int __n = vj_osc_parse_char_arguments(arglen,vargs,str);
|
int __n = vj_osc_parse_char_arguments(arglen,vargs,str);
|
||||||
memset( args,0,16 );
|
|
||||||
|
memset( args,0,sizeof(args) );
|
||||||
str[__n] = '\0';
|
str[__n] = '\0';
|
||||||
|
|
||||||
vj_osc_parse_int_arguments( arglen , vargs , args );
|
vj_osc_parse_int_arguments( arglen , vargs , args );
|
||||||
|
|||||||
Reference in New Issue
Block a user