[FFmpeg-cvslog] avformat/tee: Fix inconsistency wrt av_packet_ref() failure handling

Andreas Rheinhardt git at videolan.org
Sun Oct 3 23:49:11 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Sep  6 00:22:25 2021 +0200| [2b5d296533e75eb40a6cba656538703cdfcf11aa] | committer: Andreas Rheinhardt

avformat/tee: Fix inconsistency wrt av_packet_ref() failure handling

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavformat/tee.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index bb31218ac5..2a32dd8d10 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -565,11 +565,11 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
         if (s2 < 0)
             continue;
 
-        if ((ret = av_packet_ref(&pkt2, pkt)) < 0)
-            if (!ret_all) {
+        if ((ret = av_packet_ref(&pkt2, pkt)) < 0) {
+            if (!ret_all)
                 ret_all = ret;
-                continue;
-            }
+            continue;
+        }
         bsfs = tee->slaves[i].bsfs[s2];
         pkt2.stream_index = s2;
 



More information about the ffmpeg-cvslog mailing list