diff mbox series

[FFmpeg-devel] avfilter/vf_thumbnail_cuda: Set ret before checking it

Message ID 20240422011159.4180004-1-michael@niedermayer.cc
State Accepted
Commit 02301017d28422e4d0a4badb16f2226e70ec534a
Headers show
Series [FFmpeg-devel] avfilter/vf_thumbnail_cuda: Set ret before checking it | 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

Michael Niedermayer April 22, 2024, 1:11 a.m. UTC
Fixes: CID1418336 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavfilter/vf_thumbnail_cuda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Timo Rothenpieler April 22, 2024, 10:17 a.m. UTC | #1
On 22.04.2024 03:11, Michael Niedermayer wrote:
> Fixes: CID1418336 Logically dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>   libavfilter/vf_thumbnail_cuda.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
> index 0459070800a..8efb54f0792 100644
> --- a/libavfilter/vf_thumbnail_cuda.c
> +++ b/libavfilter/vf_thumbnail_cuda.c
> @@ -291,7 +291,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
>               hist[i] = 4 * hist[i];
>       }
>   
> -    CHECK_CU(cu->cuCtxPopCurrent(&dummy));
> +    ret = CHECK_CU(cu->cuCtxPopCurrent(&dummy));
>       if (ret < 0)
>           return ret;
>   

LGTM
Michael Niedermayer April 22, 2024, 8:48 p.m. UTC | #2
On Mon, Apr 22, 2024 at 12:17:02PM +0200, Timo Rothenpieler wrote:
> 
> 
> On 22.04.2024 03:11, Michael Niedermayer wrote:
> > Fixes: CID1418336 Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >   libavfilter/vf_thumbnail_cuda.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
> > index 0459070800a..8efb54f0792 100644
> > --- a/libavfilter/vf_thumbnail_cuda.c
> > +++ b/libavfilter/vf_thumbnail_cuda.c
> > @@ -291,7 +291,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
> >               hist[i] = 4 * hist[i];
> >       }
> > -    CHECK_CU(cu->cuCtxPopCurrent(&dummy));
> > +    ret = CHECK_CU(cu->cuCtxPopCurrent(&dummy));
> >       if (ret < 0)
> >           return ret;
> 
> LGTM

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
index 0459070800a..8efb54f0792 100644
--- a/libavfilter/vf_thumbnail_cuda.c
+++ b/libavfilter/vf_thumbnail_cuda.c
@@ -291,7 +291,7 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
             hist[i] = 4 * hist[i];
     }
 
-    CHECK_CU(cu->cuCtxPopCurrent(&dummy));
+    ret = CHECK_CU(cu->cuCtxPopCurrent(&dummy));
     if (ret < 0)
         return ret;