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

S.N. Hemanth Meenakshisundaram smeenaks
Wed Sep 22 20:11:47 CEST 2010


 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)
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?

Please let me know which is preferred.

Regards,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-audio-fifo-filter-for-lavfi-has-poll-frame-bug.patch
Type: text/x-patch
Size: 5984 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100922/121cc1a1/attachment.bin>



More information about the ffmpeg-devel mailing list