aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tee.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-06 00:32:23 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-03 20:56:12 +0200
commitb0e48651873ed989b1da063bccf47bf1084efaae (patch)
tree9def6994159e6b9961db1546a6481e81adb47087 /libavformat/tee.c
parent2b5d296533e75eb40a6cba656538703cdfcf11aa (diff)
downloadffmpeg-b0e48651873ed989b1da063bccf47bf1084efaae.tar.gz
avformat/tee: Unref packet on av_bsf_send_packet() failure
Given that the packet sent to av_bsf_send_packet() is always already refcounted, it is doubtful whether the error can even be triggered currently. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r--libavformat/tee.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/tee.c b/libavformat/tee.c
index 2a32dd8d10..9b9177dc9a 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -575,6 +575,7 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
ret = av_bsf_send_packet(bsfs, &pkt2);
if (ret < 0) {
+ av_packet_unref(&pkt2);
av_log(avf, AV_LOG_ERROR, "Error while sending packet to bitstream filter: %s\n",
av_err2str(ret));
ret = tee_process_slave_failure(avf, i, ret);