diff mbox series

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

Message ID tencent_329F35AB934EF370892D719A5240B79AB508@qq.com
State Accepted
Commit 3951c1899ece9c968587d8a0f3e9ab7498669117
Headers show
Series [FFmpeg-devel] avfilter/vf_smartblur: pass old context to sws_getCachedContext | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili Sept. 15, 2023, 3:16 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Otherwise it make no sense to use sws_getCachedContext.
---
 libavfilter/vf_smartblur.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zhao Zhili Sept. 20, 2023, 4 p.m. UTC | #1
On Fri, 2023-09-15 at 23:16 +0800, Zhao Zhili wrote:
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> Otherwise it make no sense to use sws_getCachedContext.
> ---
>  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);

Pushed.
diff mbox series

Patch

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);