summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/out/ao_lavc.c')
-rw-r--r--audio/out/ao_lavc.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/audio/out/ao_lavc.c b/audio/out/ao_lavc.c
index d8185a8dca..4fe709ce9a 100644
--- a/audio/out/ao_lavc.c
+++ b/audio/out/ao_lavc.c
@@ -72,7 +72,7 @@ static int init(struct ao *ao, char *params)
if (!encode_lavc_available(ao->encode_lavc_ctx)) {
mp_msg(MSGT_ENCODE, MSGL_ERR,
- "ao-lavc: the option -o (output file) must be specified\n");
+ "ao-lavc: the option --o (output file) must be specified\n");
return -1;
}
@@ -281,11 +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->bps = ao->channels.num * ao->samplerate * ac->sample_size;
ao->untimed = true;
ao->priv = ac;
@@ -355,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
@@ -488,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)
{