diff mbox series

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

Message ID AM7PR03MB6660669417257EF473FE5C058F359@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel] avfilter/fifo: Remove unused buffer frame | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 16, 2022, 6:02 a.m. UTC
Forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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.

 libavfilter/fifo.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Paul B Mahol Feb. 16, 2022, 8:08 a.m. UTC | #1
On Wed, Feb 16, 2022 at 7:02 AM Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> wrote:

> Forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
diff mbox series

Patch

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)