1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-03 23:11:29 +02:00

avformat/tee: Fix inconsistency wrt av_packet_ref() failure handling

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-06 00:22:25 +02:00
parent 029df555f8
commit 2b5d296533

View File

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