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

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


ffmpeg | branch: release/6.1 | Michael Niedermayer <michael at niedermayer.cc> | Wed Apr 24 03:08:14 2024 +0200| [36713f42ab54acd83070c5502a75501c4b4c92fb] | committer: Michael Niedermayer

doc/examples/demux_decode: Simplify loop

Fixes: CID1463550 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 91d27f7e02e5bec4b6e53cc7a7f15df8be017bb3)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/doc/examples/demux_decode.c b/doc/examples/demux_decode.c
index f26611d8f4..64f5547bc4 100644
--- a/doc/examples/demux_decode.c
+++ b/doc/examples/demux_decode.c
@@ -138,11 +138,9 @@ static int decode_packet(AVCodecContext *dec, const AVPacket *pkt)
             ret = output_audio_frame(frame);
 
         av_frame_unref(frame);
-        if (ret < 0)
-            return ret;
     }
 
-    return 0;
+    return ret;
 }
 
 static int open_codec_context(int *stream_idx,



More information about the ffmpeg-cvslog mailing list