linux-pipewire: Use the format properties for swap r/b

We refactored this data to be part of the format properties instead of
an out parameter. But forgot to start using this field instead.
This commit is contained in:
Kurt Kartaltepe
2023-10-21 14:08:34 -07:00
committed by Georges Basile Stavracas Neto
parent f0697980c3
commit 454fc559a2

View File

@@ -782,7 +782,6 @@ static void process_video_sync(obs_pipewire_stream *obs_pw_stream)
struct format_data format_data;
struct spa_buffer *buffer;
struct pw_buffer *b;
bool swap_red_blue = false;
bool has_buffer = true;
b = find_latest_buffer(obs_pw_stream->stream);
@@ -907,7 +906,7 @@ static void process_video_sync(obs_pipewire_stream *obs_pw_stream)
(const uint8_t **)&buffer->datas[0].data, GS_DYNAMIC);
}
if (swap_red_blue)
if (format_data.swap_red_blue)
swap_texture_red_blue(obs_pw_stream->texture);
/* Video Crop */
@@ -977,7 +976,7 @@ read_metadata:
format_data.gs_format, 1,
&bitmap_data, GS_DYNAMIC);
if (swap_red_blue)
if (format_data.swap_red_blue)
swap_texture_red_blue(
obs_pw_stream->cursor.texture);
}