From 9c8a63d449829cbaa449cb177cfb01c7a1d2f358 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 17 Nov 2015 21:51:26 +0100 Subject: [PATCH] Fix y_offset calculation if we should change the PBO size. --- mixer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mixer.cpp b/mixer.cpp index 4442545..c2e5bfc 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -338,7 +338,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode, size_t skipped_lines = 25; size_t cbcr_width = WIDTH / 2; size_t cbcr_offset = video_offset / 2; - size_t y_offset = cbcr_offset + cbcr_width * (HEIGHT + EXTRAHEIGHT) * sizeof(uint16_t) + video_offset / 2; + size_t y_offset = video_frame.size / 2 + video_offset / 2; glBindTexture(GL_TEXTURE_2D, userdata->tex_cbcr); check_error(); -- 2.39.2