mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-13 13:29:58 -05:00
device-port: Add mechanism to free implementation data
This will be needed if the implementation data stores pointers to additional data that needs to be freed as well.
This commit is contained in:
parent
694662d936
commit
9e10c1caa3
2 changed files with 6 additions and 0 deletions
|
|
@ -104,6 +104,9 @@ static void device_port_free(pa_object *o) {
|
|||
pa_assert(p);
|
||||
pa_assert(pa_device_port_refcnt(p) == 0);
|
||||
|
||||
if (p->impl_free)
|
||||
p->impl_free(p);
|
||||
|
||||
if (p->proplist)
|
||||
pa_proplist_free(p->proplist);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ struct pa_device_port {
|
|||
pa_direction_t direction;
|
||||
int64_t latency_offset;
|
||||
|
||||
/* Free the extra implementation specific data. Called before other members are freed. */
|
||||
void (*impl_free)(pa_device_port *port);
|
||||
|
||||
/* .. followed by some implementation specific data */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue