summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorkkitayam <[email protected]>2022-10-06 21:10:27 +0900
committerkkitayam <[email protected]>2022-10-06 21:10:27 +0900
commit3499aa2b2113f0098afff9eb2efd6dda78426a1b (patch)
tree1e7d7d058367057ff7d6db8fd5c3524f677f2769 /examples
parentee832e4e37a0ea35d9c2751ee3600ae7a600cb12 (diff)
Fix pointer
Diffstat (limited to 'examples')
-rw-r--r--examples/device/video_capture/src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/device/video_capture/src/main.c b/examples/device/video_capture/src/main.c
index 362b168d4..60c58b853 100644
--- a/examples/device/video_capture/src/main.c
+++ b/examples/device/video_capture/src/main.c
@@ -110,7 +110,7 @@ static unsigned tx_busy = 0;
static unsigned interval_ms = 1000 / FRAME_RATE;
/* YUY2 frame buffer */
-#if 1
+#ifdef CFG_EXAMPLE_VIDEO_READONLY
#include "images.h"
static struct {
uint32_t size;
@@ -181,7 +181,7 @@ void video_task(void)
already_sent = 1;
start_ms = board_millis();
#ifdef CFG_EXAMPLE_VIDEO_READONLY
- tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frames[frame_num % 8].buffer, frames[frame_num % 8].size);
+ tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)frames[frame_num % 8].buffer, frames[frame_num % 8].size);
#else
fill_color_bar(frame_buffer, frame_num);
tud_video_n_frame_xfer(0, 0, (void*)frame_buffer, FRAME_WIDTH * FRAME_HEIGHT * 16/8);
@@ -194,7 +194,7 @@ void video_task(void)
start_ms += interval_ms;
#ifdef CFG_EXAMPLE_VIDEO_READONLY
- tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)&frames[frame_num % 8].buffer, frames[frame_num % 8].size);
+ tud_video_n_frame_xfer(0, 0, (void*)(uintptr_t)frames[frame_num % 8].buffer, frames[frame_num % 8].size);
#else
fill_color_bar(frame_buffer, frame_num);
tud_video_n_frame_xfer(0, 0, (void*)frame_buffer, FRAME_WIDTH * FRAME_HEIGHT * 16/8);