[FFmpeg-cvslog] doc/examples/qsv_transcode: Simplify loop

Michael Niedermayer git at videolan.org
Wed May 22 23:14:56 EEST 2024


ffmpeg | branch: release/7.0 | Michael Niedermayer <michael at niedermayer.cc> | Wed Apr 24 03:20:38 2024 +0200| [53868f5193d63e499c0e36aeef9376b40ecbd189] | committer: Michael Niedermayer

doc/examples/qsv_transcode: Simplify loop

Fixes: CID1428858(2/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang at intel.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 82cce209349d2a7c893a4f9691ec8698704b0486)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 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 972126800b..3d98729474 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -334,10 +334,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)



More information about the ffmpeg-cvslog mailing list