From 2b5d296533e75eb40a6cba656538703cdfcf11aa Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 6 Sep 2021 00:22:25 +0200 Subject: [PATCH] avformat/tee: Fix inconsistency wrt av_packet_ref() failure handling Signed-off-by: Andreas Rheinhardt --- 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;