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.rheinha...@outlook.com>
---
 libavformat/tee.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index a5bf34d083..505873ce1e 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);
-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to