[FFmpeg-cvslog] avfilter/vf_smartblur: pass old context to sws_getCachedContext

Zhao Zhili git at videolan.org
Wed Sep 20 18:59:58 EEST 2023


ffmpeg | branch: master | Zhao Zhili <zhilizhao at tencent.com> | Fri Sep 15 23:16:17 2023 +0800| [3951c1899ece9c968587d8a0f3e9ab7498669117] | committer: Zhao Zhili

avfilter/vf_smartblur: pass old context to sws_getCachedContext

Otherwise it make no sense to use sws_getCachedContext.

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3951c1899ece9c968587d8a0f3e9ab7498669117
---

 libavfilter/vf_smartblur.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c
index 85d8d502e1..ae0ec05b2d 100644
--- a/libavfilter/vf_smartblur.c
+++ b/libavfilter/vf_smartblur.c
@@ -136,7 +136,7 @@ static int alloc_sws_context(FilterParam *f, int width, int height, unsigned int
     vec->coeff[vec->length / 2] += 1.0 - f->strength;
     sws_filter.lumH = sws_filter.lumV = vec;
     sws_filter.chrH = sws_filter.chrV = NULL;
-    f->filter_context = sws_getCachedContext(NULL,
+    f->filter_context = sws_getCachedContext(f->filter_context,
                                              width, height, AV_PIX_FMT_GRAY8,
                                              width, height, AV_PIX_FMT_GRAY8,
                                              flags, &sws_filter, NULL, NULL);



More information about the ffmpeg-cvslog mailing list