diff mbox series

[FFmpeg-devel,27/34] avformat/tee: Fix inconsistency wrt av_packet_ref() failure handling

Message ID AM7PR03MB6660E06A457E6BF38428A1A58FD29@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,01/11] avformat/mux: Sanitize packets without data and side-data
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 6, 2021, 2:27 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/tee.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 759535bdea..a5bf34d083 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;