diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index 3cd5104d..375ba4f0 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -1313,7 +1313,7 @@ int v4l2_pull_frame(void *vv,VJFrame *dst) v4l2info *v = (v4l2info*) vv; - if( (dst == NULL || v->rw == 1 && v->pause_read ) || (v->rw == 0 && !v->is_streaming) ) + if( (dst == NULL) || ( v->rw == 1 && v->pause_read ) || (v->rw == 0 && !v->is_streaming) ) return 0; if( v->scaler == NULL ) { diff --git a/veejay-current/veejay-server/libvje/effects/motionmap.c b/veejay-current/veejay-server/libvje/effects/motionmap.c index 98345db4..117199eb 100644 --- a/veejay-current/veejay-server/libvje/effects/motionmap.c +++ b/veejay-current/veejay-server/libvje/effects/motionmap.c @@ -291,11 +291,9 @@ static int32_t motionmap_activity_level( uint8_t *I, int width, int height ) { const unsigned int len = (width * height); int32_t level = 0; - int r,c; - for (r = 0; r < len; r += width) { - for ( c = 0; c < width; c ++ ) { - level += I[r + c]; - } + unsigned int i; + for( i = 0; i < len; i ++ ) { + level += I[i]; } return (level>>8); }