mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
audio: remove unused readonly field
Its last use was removed in 433402b5
.
This commit is contained in:
parent
ec72feaba3
commit
5eae20fc0f
@ -118,7 +118,6 @@ void mp_audio_set_null_data(struct mp_audio *mpa)
|
|||||||
mpa->allocated[n] = NULL;
|
mpa->allocated[n] = NULL;
|
||||||
}
|
}
|
||||||
mpa->samples = 0;
|
mpa->samples = 0;
|
||||||
mpa->readonly = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_plane_size(const struct mp_audio *mpa, int samples)
|
static int get_plane_size(const struct mp_audio *mpa, int samples)
|
||||||
@ -261,7 +260,7 @@ void mp_audio_skip_samples(struct mp_audio *data, int samples)
|
|||||||
// Will return true for non-refcounted frames.
|
// Will return true for non-refcounted frames.
|
||||||
bool mp_audio_is_writeable(struct mp_audio *data)
|
bool mp_audio_is_writeable(struct mp_audio *data)
|
||||||
{
|
{
|
||||||
bool ok = !data->readonly;
|
bool ok = true;
|
||||||
for (int n = 0; n < MP_NUM_CHANNELS; n++) {
|
for (int n = 0; n < MP_NUM_CHANNELS; n++) {
|
||||||
if (data->allocated[n])
|
if (data->allocated[n])
|
||||||
ok &= av_buffer_is_writable(data->allocated[n]);
|
ok &= av_buffer_is_writable(data->allocated[n]);
|
||||||
|
@ -38,7 +38,6 @@ struct mp_audio {
|
|||||||
int bps; // size of sub-samples (af_fmt2bps(format))
|
int bps; // size of sub-samples (af_fmt2bps(format))
|
||||||
|
|
||||||
// --- private
|
// --- private
|
||||||
bool readonly;
|
|
||||||
// These do not necessarily map directly to planes[]. They can have
|
// These do not necessarily map directly to planes[]. They can have
|
||||||
// different order or count. There shouldn't be more buffers than planes.
|
// different order or count. There shouldn't be more buffers than planes.
|
||||||
// If allocated[n] is NULL, allocated[n+1] must also be NULL.
|
// If allocated[n] is NULL, allocated[n+1] must also be NULL.
|
||||||
|
Loading…
Reference in New Issue
Block a user