diff mbox series

[FFmpeg-devel,2/5] doc/examples/qsv_transcode: Simplify loop

Message ID 20240424014522.4015429-2-michael@niedermayer.cc
State Accepted
Commit 82cce209349d2a7c893a4f9691ec8698704b0486
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: CID1428858(2/2) Logically dead code

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

Comments

Xiang, Haihao April 24, 2024, 5:25 a.m. UTC | #1
On Wo, 2024-04-24 at 03:45 +0200, Michael Niedermayer wrote:
> Fixes: CID1428858(2/2) Logically dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  doc/examples/qsv_transcode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
> index 8e7d2899f12..a4440a3403f 100644
> --- a/doc/examples/qsv_transcode.c
> +++ b/doc/examples/qsv_transcode.c
> @@ -335,10 +335,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec
> *enc_codec, char *optstr)
>  
>  fail:
>          av_frame_free(&frame);
> -        if (ret < 0)
> -            return ret;
>      }
> -    return 0;
> +    return ret;
>  }
>  
>  int main(int argc, char **argv)

LGTM

Thanks
Haihao
Michael Niedermayer April 24, 2024, 9:05 p.m. UTC | #2
On Wed, Apr 24, 2024 at 05:25:11AM +0000, Xiang, Haihao wrote:
> On Wo, 2024-04-24 at 03:45 +0200, Michael Niedermayer wrote:
> > Fixes: CID1428858(2/2) Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  doc/examples/qsv_transcode.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
> > index 8e7d2899f12..a4440a3403f 100644
> > --- a/doc/examples/qsv_transcode.c
> > +++ b/doc/examples/qsv_transcode.c
> > @@ -335,10 +335,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec
> > *enc_codec, char *optstr)
> >  
> >  fail:
> >          av_frame_free(&frame);
> > -        if (ret < 0)
> > -            return ret;
> >      }
> > -    return 0;
> > +    return ret;
> >  }
> >  
> >  int main(int argc, char **argv)
> 
> LGTM

will apply

thx

[...]
diff mbox series

Patch

diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index 8e7d2899f12..a4440a3403f 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -335,10 +335,8 @@  static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec, char *optstr)
 
 fail:
         av_frame_free(&frame);
-        if (ret < 0)
-            return ret;
     }
-    return 0;
+    return ret;
 }
 
 int main(int argc, char **argv)