summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-15 14:32:14 +0200
committerwm4 <wm4@nowhere>2015-06-15 14:32:14 +0200
commit5eae20fc0f2387dfffe276e64e1132e7ad8093a9 (patch)
tree63f8d3e70ebff75427a1c0fbd999f05f3e96eae4
parentec72feaba3631a4ab594bc9797ab5070f1da9198 (diff)
downloadmpv-5eae20fc0f2387dfffe276e64e1132e7ad8093a9.tar.bz2
mpv-5eae20fc0f2387dfffe276e64e1132e7ad8093a9.tar.xz
audio: remove unused readonly field
Its last use was removed in 433402b5.
-rw-r--r--audio/audio.c3
-rw-r--r--audio/audio.h1
2 files changed, 1 insertions, 3 deletions
diff --git a/audio/audio.c b/audio/audio.c
index baf00c08b2..a61e8c458c 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -118,7 +118,6 @@ void mp_audio_set_null_data(struct mp_audio *mpa)
mpa->allocated[n] = NULL;
}
mpa->samples = 0;
- mpa->readonly = false;
}
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.
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++) {
if (data->allocated[n])
ok &= av_buffer_is_writable(data->allocated[n]);
diff --git a/audio/audio.h b/audio/audio.h
index 7bfffa7887..a221b126ac 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -38,7 +38,6 @@ struct mp_audio {
int bps; // size of sub-samples (af_fmt2bps(format))
// --- private
- bool readonly;
// These do not necessarily map directly to planes[]. They can have
// different order or count. There shouldn't be more buffers than planes.
// If allocated[n] is NULL, allocated[n+1] must also be NULL.