Skip to content

Commit 3499aa2

Browse files
committed
Fix pointer
1 parent ee832e4 commit 3499aa2

File tree

1 file changed

+3
-3
lines changed
  • examples/device/video_capture/src

1 file changed

+3
-3
lines changed

examples/device/video_capture/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static unsigned tx_busy = 0;
110110
static unsigned interval_ms = 1000 / FRAME_RATE;
111111

112112
/* YUY2 frame buffer */
113-
#if 1
113+
#ifdef CFG_EXAMPLE_VIDEO_READONLY
114114
#include "images.h"
115115
static struct {
116116
uint32_t size;
@@ -181,7 +181,7 @@ void video_task(void)
181181
already_sent = 1;
182182
start_ms = board_millis();
183183
#ifdef CFG_EXAMPLE_VIDEO_READONLY
184-
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frames[frame_num % 8].buffer, frames[frame_num % 8].size);
184+
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)frames[frame_num % 8].buffer, frames[frame_num % 8].size);
185185
#else
186186
fill_color_bar(frame_buffer, frame_num);
187187
tud_video_n_frame_xfer(0, 0, (void*)frame_buffer, FRAME_WIDTH * FRAME_HEIGHT * 16/8);
@@ -194,7 +194,7 @@ void video_task(void)
194194
start_ms += interval_ms;
195195

196196
#ifdef CFG_EXAMPLE_VIDEO_READONLY
197-
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frames[frame_num % 8].buffer, frames[frame_num % 8].size);
197+
tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)frames[frame_num % 8].buffer, frames[frame_num % 8].size);
198198
#else
199199
fill_color_bar(frame_buffer, frame_num);
200200
tud_video_n_frame_xfer(0, 0, (void*)frame_buffer, FRAME_WIDTH * FRAME_HEIGHT * 16/8);

0 commit comments

Comments
 (0)