1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-13 20:16:27 +02:00

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>
This commit is contained in:
Andreas Rheinhardt 2021-09-06 00:32:23 +02:00
parent 2b5d296533
commit b0e4865187

View File

@ -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);