[MPlayer-dev-eng] [PATCH] make audio filters support EOF

Ulion ulion2002 at gmail.com
Fri Nov 23 15:54:37 CET 2007


2007/11/23, Uoti Urpala <uoti.urpala at pp1.inet.fi>:
> On Fri, 2007-11-23 at 15:23 +0800, Ulion wrote:
> > 2007/11/23, Ulion <ulion2002 at gmail.com>:
> > > Since currently the audio filters do not have any eof info, so it may
> > > lost output the last part audio samples if it buffer samples.
> > > So I made this patch to give audio filters a chance to flush the
> > > buffered data if they can.
>
> Scaletempo is the only current filter which does really significant
> buffering. Do you need/intend to add such flushing functionality for
> scaletempo? I don't think it's a good idea to add this code without
> anything using it.

Another filter I wrote days ago af_lavcac3enc also buffer samples, but
the last block samples always has no chance to be encoded (outputed),
so I try to add eof feature into audio filters.

>
> The way you detect EOF is not reliable. It can be triggered by temporary
> decoding errors. Flushing filters in that case might make sense (there
> will likely be a discontinuity in the audio there) but decoding can
> continue afterwards and the variable shouldn't be called "eof" then.

Yes, you are right, I also consider call that variable as 'flush'
since maybe there's other situation we can use this feature. Should we
call it 'flush'?
Then is the current detection of eof suitable for flush purpose?

-- 
Ulion



More information about the MPlayer-dev-eng mailing list