fix: unnecessary structs

This commit is contained in:
2026-05-16 18:47:16 +02:00
parent ba44237661
commit 2a8bd612b3
+6 -9
View File
@@ -101,9 +101,8 @@ static void start_video_background_read(VideoCapture *video_capture,
Context *context, int input_index, Context *context, int input_index,
bool trace_fps) { bool trace_fps) {
pthread_t thread; pthread_t thread;
struct VideoBackgroundReadArgs *process_args = VideoBackgroundReadArgs *process_args =
(struct VideoBackgroundReadArgs *)malloc( (VideoBackgroundReadArgs *)malloc(sizeof(VideoBackgroundReadArgs));
sizeof(struct VideoBackgroundReadArgs));
process_args->capture = video_capture; process_args->capture = video_capture;
process_args->context = context; process_args->context = context;
process_args->input_index = input_index; process_args->input_index = input_index;
@@ -201,9 +200,8 @@ static void midi_callback(unsigned char code, unsigned char value) {
static void start_state_background_write() { static void start_state_background_write() {
pthread_t thread; pthread_t thread;
struct StateBackgroundWriteArgs *process_args = StateBackgroundWriteArgs *process_args =
(struct StateBackgroundWriteArgs *)malloc( (StateBackgroundWriteArgs *)malloc(sizeof(StateBackgroundWriteArgs));
sizeof(struct StateBackgroundWriteArgs));
process_args->context = &context; process_args->context = &context;
process_args->state_config = project.state_config; process_args->state_config = project.state_config;
process_args->midi = &midi; process_args->midi = &midi;
@@ -218,9 +216,8 @@ static void start_state_background_write() {
static void start_midi_background_listen() { static void start_midi_background_listen() {
pthread_t thread; pthread_t thread;
struct MidiBackgroundListenArgs *process_args = MidiBackgroundListenArgs *process_args =
(struct MidiBackgroundListenArgs *)malloc( (MidiBackgroundListenArgs *)malloc(sizeof(MidiBackgroundListenArgs));
sizeof(struct MidiBackgroundListenArgs));
process_args->device = &midi; process_args->device = &midi;
process_args->context = &context; process_args->context = &context;
process_args->event_callback = midi_callback; process_args->event_callback = midi_callback;