mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
obs_data: Fix wrong data queried for release
On release of obs_data, if the default/autoselect values pointed toward a sub-object or a sub-array, it would look up the data for the regular user value. (Palana must have forgot to change these functions around when adding the default/autoselect functionality)
This commit is contained in:
parent
ca8aba0bf4
commit
fe13f59e3d
|
@ -137,7 +137,7 @@ static inline obs_data_t get_item_default_obj(struct obs_data_item *item)
|
|||
if (!item || !item->default_size)
|
||||
return NULL;
|
||||
|
||||
return *(obs_data_t*)get_item_data(item);
|
||||
return *(obs_data_t*)get_default_data_ptr(item);
|
||||
}
|
||||
|
||||
static inline obs_data_t get_item_autoselect_obj(struct obs_data_item *item)
|
||||
|
@ -145,7 +145,7 @@ static inline obs_data_t get_item_autoselect_obj(struct obs_data_item *item)
|
|||
if (!item || !item->autoselect_size)
|
||||
return NULL;
|
||||
|
||||
return *(obs_data_t*)get_item_data(item);
|
||||
return *(obs_data_t*)get_autoselect_data_ptr(item);
|
||||
}
|
||||
|
||||
static inline obs_data_array_t get_item_array(struct obs_data_item *item)
|
||||
|
@ -162,7 +162,7 @@ static inline obs_data_array_t get_item_default_array(
|
|||
if (!item || !item->default_size)
|
||||
return NULL;
|
||||
|
||||
return *(obs_data_array_t*)get_item_data(item);
|
||||
return *(obs_data_array_t*)get_default_data_ptr(item);
|
||||
}
|
||||
|
||||
static inline obs_data_array_t get_item_autoselect_array(
|
||||
|
@ -171,7 +171,7 @@ static inline obs_data_array_t get_item_autoselect_array(
|
|||
if (!item || !item->autoselect_size)
|
||||
return NULL;
|
||||
|
||||
return *(obs_data_array_t*)get_item_data(item);
|
||||
return *(obs_data_array_t*)get_autoselect_data_ptr(item);
|
||||
}
|
||||
|
||||
static inline void item_data_release(struct obs_data_item *item)
|
||||
|
|
Loading…
Reference in a new issue