diff mbox series

[FFmpeg-devel,4/5] doc/examples/qsv_transcode: Simplify str_to_dict() loop

Message ID 20240424014522.4015429-4-michael@niedermayer.cc
State Accepted
Commit 191950d1bfc3924d1b54f236b2c35149ba4487a1
Headers show
Series [FFmpeg-devel,1/5] doc/examples/demux_decode: Simplify loop | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Michael Niedermayer April 24, 2024, 1:45 a.m. UTC
Fixes: CID1517022 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 doc/examples/qsv_transcode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Xiang, Haihao April 24, 2024, 5:18 a.m. UTC | #1
On Wo, 2024-04-24 at 03:45 +0200, Michael Niedermayer wrote:
> Fixes: CID1517022 Logically dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  doc/examples/qsv_transcode.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
> index a4440a3403f..8e843ddd84c 100644
> --- a/doc/examples/qsv_transcode.c
> +++ b/doc/examples/qsv_transcode.c
> @@ -76,8 +76,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
>          if (value == NULL)
>              return AVERROR(EINVAL);
>          av_dict_set(opt, key, value, 0);
> -    } while(key != NULL);
> -    return 0;
> +    } while(1);
>  }
>  
>  static int dynamic_set_parameter(AVCodecContext *avctx)

LGTM, thanks for catching & fixing this.

- Haihao
Michael Niedermayer April 24, 2024, 9:07 p.m. UTC | #2
On Wed, Apr 24, 2024 at 05:18:55AM +0000, Xiang, Haihao wrote:
> On Wo, 2024-04-24 at 03:45 +0200, Michael Niedermayer wrote:
> > Fixes: CID1517022 Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  doc/examples/qsv_transcode.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
> > index a4440a3403f..8e843ddd84c 100644
> > --- a/doc/examples/qsv_transcode.c
> > +++ b/doc/examples/qsv_transcode.c
> > @@ -76,8 +76,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
> >          if (value == NULL)
> >              return AVERROR(EINVAL);
> >          av_dict_set(opt, key, value, 0);
> > -    } while(key != NULL);
> > -    return 0;
> > +    } while(1);
> >  }
> >  
> >  static int dynamic_set_parameter(AVCodecContext *avctx)
> 
> LGTM, thanks for catching & fixing this.

will apply

thx

[...]
diff mbox series

Patch

diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index a4440a3403f..8e843ddd84c 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -76,8 +76,7 @@  static int str_to_dict(char* optstr, AVDictionary **opt)
         if (value == NULL)
             return AVERROR(EINVAL);
         av_dict_set(opt, key, value, 0);
-    } while(key != NULL);
-    return 0;
+    } while(1);
 }
 
 static int dynamic_set_parameter(AVCodecContext *avctx)