[FFmpeg-devel] [PATCH v2 04/15] fftools/ffmpeg_filter: don't clear buffersrc params

Niklas Haas ffmpeg at haasn.xyz
Wed Dec 13 15:12:01 EET 2023


From: Niklas Haas <git at 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(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index ada235b084..e5b00123f2 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1461,11 +1461,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");
-- 
2.43.0



More information about the ffmpeg-devel mailing list