summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-16 19:15:32 +0200
committerwm4 <wm4@nowhere>2013-06-16 19:36:56 +0200
commit4d3a2c7e0dac38546f5fc2c7737a6ec1f09e30f6 (patch)
tree8324cc1b661ff83ad9a8f50c5f08b42d838e4731 /audio/out/ao_lavc.c
parentf88193091b3de59b496633682b659cd388e24a59 (diff)
downloadmpv-4d3a2c7e0dac38546f5fc2c7737a6ec1f09e30f6.tar.bz2
mpv-4d3a2c7e0dac38546f5fc2c7737a6ec1f09e30f6.tar.xz
audio/out: remove ao->outburst/buffersize fields
The core didn't use these fields, and use of them was inconsistent accross AOs. Some didn't use them at all. Some only set them; the values were completely unused by the core. Some made full use of them. Remove these fields. In places where they are still needed, make them private AO state. Remove the --abs option. It set the buffer size for ao_oss and ao_dsound (being ignored by all other AOs), and was already marked as obsolete. If it turns out that it's still needed for ao_oss or ao_dsound, their default buffer sizes could be adjusted, and if even that doesn't help, AO suboptions could be added in these cases.
Diffstat (limited to 'audio/out/ao_lavc.c')
-rw-r--r--audio/out/ao_lavc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index d2ae5e1e53..4fe709ce9a 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -281,10 +281,6 @@ out_takefirst:
encode_lavc_getoffset(ao->encode_lavc_ctx, ac->stream);
ac->offset_left = ac->offset;
- //fill_ao_data:
- ao->outburst =
- ac->aframesize * ac->sample_size * ao->channels.num * ac->framecount;
- ao->buffersize = ao->outburst * 2;
ao->untimed = true;
ao->priv = ac;
@@ -354,7 +350,9 @@ static void uninit(struct ao *ao, bool cut_audio)
// return: how many bytes can be played without blocking
static int get_space(struct ao *ao)
{
- return ao->outburst;
+ struct priv *ac = ao->priv;
+
+ return ac->aframesize * ac->sample_size * ao->channels.num * ac->framecount;
}
// must get exactly ac->aframesize amount of data
@@ -487,7 +485,7 @@ static int encode(struct ao *ao, double apts, void *data)
}
// plays 'len' bytes of 'data'
-// it should round it down to outburst*n
+// it should round it down to frame sizes
// return: number of bytes played
static int play(struct ao *ao, void *data, int len, int flags)
{