[MPlayer-dev-eng] [PATCH] mencoder: detect end of audio stream while encoded data still buffered

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon May 5 18:53:51 CEST 2014


On Mon, May 05, 2014 at 11:58:27PM +0930, Kieran Clancy wrote:
> After running a debugger, I found the problem is that for some VBR
> codecs like mp3lame, mux_a->buffer_len is not always zero on
> end-of-stream.

What exactly do you mean by "for some"?
For mp3lame it is this crappy workaround in ae_lame.c that should cause it:
mux_a->wf->nBlockAlign=encoder->params.samples_per_frame; // required for l3codeca.acm + WMP 6.4

I would hope we have no such hacks for all others.

> This patch checks mux_a->buffer_len and ensures any remaining data is muxed.

Any reason to not just do it like attached patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: audio_eof.diff
Type: text/x-diff
Size: 1040 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140505/e2c63a48/attachment.bin>


More information about the MPlayer-dev-eng mailing list