mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
SPDX tags make the licensing information easy to understand and clear, and they are machine parseable. See https://spdx.dev for more information.
30 lines
645 B
C
30 lines
645 B
C
/* PipeWire */
|
|
/* SPDX-FileCopyrightText: Copyright © 2020 Wim Taymans */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <pipewire/log.h>
|
|
#include <pipewire/map.h>
|
|
#include <pipewire/properties.h>
|
|
|
|
#include "internal.h"
|
|
#include "log.h"
|
|
#include "sample.h"
|
|
|
|
void sample_free(struct sample *sample)
|
|
{
|
|
struct impl * const impl = sample->impl;
|
|
|
|
pw_log_info("free sample id:%u name:%s", sample->index, sample->name);
|
|
|
|
impl->stat.sample_cache -= sample->length;
|
|
|
|
if (sample->index != SPA_ID_INVALID)
|
|
pw_map_remove(&impl->samples, sample->index);
|
|
|
|
pw_properties_free(sample->props);
|
|
|
|
free(sample->buffer);
|
|
free(sample);
|
|
}
|