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

Michael Niedermayer git at videolan.org
Sat May 25 01:56:20 EEST 2024


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

doc/examples/vaapi_transcode: Simplify loop

Fixes: CID1428858(1/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "mypopy at gmail.com" <mypopy at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c9c11a0866d45827201b034349bceb2dc58a3499)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 doc/examples/vaapi_transcode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/doc/examples/vaapi_transcode.c b/doc/examples/vaapi_transcode.c
index 8367cb3040..e1b7a43883 100644
--- a/doc/examples/vaapi_transcode.c
+++ b/doc/examples/vaapi_transcode.c
@@ -215,10 +215,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec)
 
 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