[FFmpeg-devel] [PATCH] avfilter/fifo: Remove unused buffer frame

Paul B Mahol onemda at gmail.com
Wed Feb 16 10:08:53 EET 2022


On Wed, Feb 16, 2022 at 7:02 AM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:

> Forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> What is actually the use-case of these filters? The documentation states
> that they are auto-inserted, yet this is no longer true any more since
> 4ca1fb9d2a91757c8c4c34dd456abf340e3f765f.
>

Now avfilter buffers internally if needed, so filters are no longer useful.
Also they seems to call malloc for every input frame.


>
>  libavfilter/fifo.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
> index 1c7be88ae1..8b34055fde 100644
> --- a/libavfilter/fifo.c
> +++ b/libavfilter/fifo.c
> @@ -38,13 +38,6 @@ typedef struct Buf {
>  typedef struct FifoContext {
>      Buf  root;
>      Buf *last;   ///< last buffered frame
> -
> -    /**
> -     * When a specific number of output samples is requested, the partial
> -     * buffer is stored here
> -     */
> -    AVFrame *out;
> -    int allocated_samples;      ///< number of samples out was allocated
> for
>  } FifoContext;
>
>  static av_cold int init(AVFilterContext *ctx)
> @@ -65,8 +58,6 @@ static av_cold void uninit(AVFilterContext *ctx)
>          av_frame_free(&buf->frame);
>          av_free(buf);
>      }
> -
> -    av_frame_free(&s->out);
>  }
>
>  static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
> --
> 2.32.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list