mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-08 12:24:09 +00:00
linux-pipewire: Explicitly handle NULL format strings
This is a workaround to the compiler complaining about directive arguments being null.
This commit is contained in:
parent
549c0f5850
commit
bdfead801e
|
@ -1013,6 +1013,7 @@ static void on_param_changed_cb(void *user_data, uint32_t id,
|
||||||
obs_pipewire *obs_pw = obs_pw_stream->obs_pw;
|
obs_pipewire *obs_pw = obs_pw_stream->obs_pw;
|
||||||
struct spa_pod_builder pod_builder;
|
struct spa_pod_builder pod_builder;
|
||||||
const struct spa_pod *params[5];
|
const struct spa_pod *params[5];
|
||||||
|
const char *format_name;
|
||||||
uint32_t n_params = 0;
|
uint32_t n_params = 0;
|
||||||
uint32_t buffer_types;
|
uint32_t buffer_types;
|
||||||
uint32_t output_flags;
|
uint32_t output_flags;
|
||||||
|
@ -1046,10 +1047,11 @@ static void on_param_changed_cb(void *user_data, uint32_t id,
|
||||||
|
|
||||||
blog(LOG_INFO, "[pipewire] Negotiated format:");
|
blog(LOG_INFO, "[pipewire] Negotiated format:");
|
||||||
|
|
||||||
|
format_name = spa_debug_type_find_name(
|
||||||
|
spa_type_video_format, obs_pw_stream->format.info.raw.format);
|
||||||
blog(LOG_INFO, "[pipewire] Format: %d (%s)",
|
blog(LOG_INFO, "[pipewire] Format: %d (%s)",
|
||||||
obs_pw_stream->format.info.raw.format,
|
obs_pw_stream->format.info.raw.format,
|
||||||
spa_debug_type_find_name(spa_type_video_format,
|
format_name ? format_name : "unknown format");
|
||||||
obs_pw_stream->format.info.raw.format));
|
|
||||||
|
|
||||||
if (has_modifier) {
|
if (has_modifier) {
|
||||||
blog(LOG_INFO, "[pipewire] Modifier: 0x%" PRIx64,
|
blog(LOG_INFO, "[pipewire] Modifier: 0x%" PRIx64,
|
||||||
|
|
Loading…
Reference in a new issue