[FFmpeg-devel] [PATCH] Add af_afifo - audio fifo filter

Michael Niedermayer michaelni
Wed Sep 22 21:21:58 CEST 2010

On Wed, Sep 22, 2010 at 11:11:47AM -0700, S.N. Hemanth Meenakshisundaram wrote:
>  On 09/20/2010 03:29 PM, Michael Niedermayer wrote:
> > On Thu, Aug 19, 2010 at 06:10:47AM -0700, S.N. Hemanth Meenakshisundaram wrote:
> > [...]
> > +    .outputs     = (AVFilterPad[]) {{ .name             = "default",
> > +                                      .type             = AVMEDIA_TYPE_AUDIO,
> > +                                      .request_frame    = request_frame, },
> > +                                    { .name = NULL}},
> > +};
> > this seems to be missing a poll_frame()
> >
> > [...]
> >
> Added a poll frame that returns the number of audio buffers (frames)

i dont think anything could care about the number of (arbitrarily sized)
frames. The number of samples may be interresting though

> currently with the fifo filter. However this causes a bug with ffmpeg.c
> use of lavfi.
> ffmpeg.c video and audio lavfi code currently works by giving a frame to
> the lavfi chain (using asrc or vsrc add buffer call), querying poll
> frame and then calling request frame only if poll frame returns a value > 0.
> The problem is that asrc (like vsrc filter) does not start giving frames
> to the next filter until the first request frame. So if a fifo filter is
> inserted in the chain and its poll frame returns the number of frames
> with the fifo (0) then the chain never consumes frames.
> So should ffmpeg.c be fixed so that it doesn't do a poll frame before
> calling request frame or should the poll frame of the fifo filters (both
> audio and video) simply propagate the query to the previous filter in
> the chain?

the fifo filters of course must propagate polls if they are empty

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100922/3d01f906/attachment.pgp>

More information about the ffmpeg-devel mailing list