[FFmpeg-devel] [PATCH] avfilter/af_amix: switch to activate

Nicolas George george at nsup.org
Sat Aug 26 21:02:12 EEST 2017


Le nonidi 9 fructidor, an CCXXV, Paul B Mahol a écrit :
> Really fixes hangs and infinite loops.
> 
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavfilter/af_amix.c | 161 +++++++++++++++++++++++++-------------------------
>  1 file changed, 81 insertions(+), 80 deletions(-)
> 
> diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
> index 78be57a..989fd84 100644
> --- a/libavfilter/af_amix.c
> +++ b/libavfilter/af_amix.c
> @@ -41,6 +41,7 @@

I am sorry to say, but it is not good at all. But it is not your fault
at all, it is because of the existing code.

From the beginning, this filter suffered from the "let's reinvent the
wheel instead of designing a proper framework, and let us make it
square" syndrome: there is an audio FIFO, then a strange FrameList /
FrameInfo structure to keep the frames within the FIFO.

The activate design comes with the framework that was needed: a real
conversion to activate would mean getting rid of all that, keeping only
output_frame() (and the init / format code, of course) and making it
query the links' fifo.

That said, I do not object to the patch if it fixes something. But I
think a big /* FIXME */ comment would be helpful to avoid people taking
this code as an example.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170826/0fc8846f/attachment.sig>


More information about the ffmpeg-devel mailing list