Commit 1bc83f6e authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Marton Balint

avformat/tee: Use ref instead copy in write_packet

Replace av_copy_packet and deprecated av_dup_packet by
creating reference using av_packet_ref.
Reviewed-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarJan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent a3c877ac
......@@ -527,8 +527,8 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
if (s2 < 0)
continue;
if ((ret = av_copy_packet(&pkt2, pkt)) < 0 ||
(ret = av_dup_packet(&pkt2))< 0)
memset(&pkt2, 0, sizeof(AVPacket));
if ((ret = av_packet_ref(&pkt2, pkt)) < 0)
if (!ret_all) {
ret_all = ret;
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment