diff mbox series

[FFmpeg-devel,04/25] fftools/ffmpeg_filter: don't clear buffersrc params

Message ID 20231109122534.124157-5-ffmpeg@haasn.xyz
State New
Headers show
Series YUVJ removal + filter negotiation | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Niklas Haas Nov. 9, 2023, 12:19 p.m. UTC
From: Niklas Haas <git@haasn.dev>

This memset is bogus, it accomplishes nothing in the best case and
regresses future additions to AVBufferSrcParameters in the worst case.
---
 fftools/ffmpeg_filter.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Anton Khirnov Nov. 27, 2023, 4:05 p.m. UTC | #1
Quoting Niklas Haas (2023-11-09 13:19:36)
> From: Niklas Haas <git@haasn.dev>
> 
> This memset is bogus, it accomplishes nothing in the best case and
> regresses future additions to AVBufferSrcParameters in the worst case.
> ---
>  fftools/ffmpeg_filter.c | 3 ---
>  1 file changed, 3 deletions(-)

Looks very ok.
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index b7da105141..e699798897 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1400,11 +1400,8 @@  static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
     int ret, pad_idx = 0;
     int64_t tsoffset = 0;
     AVBufferSrcParameters *par = av_buffersrc_parameters_alloc();
-
     if (!par)
         return AVERROR(ENOMEM);
-    memset(par, 0, sizeof(*par));
-    par->format = AV_PIX_FMT_NONE;
 
     if (ist->dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
         av_log(fg, AV_LOG_ERROR, "Cannot connect video filter to audio input\n");