From: Jan Sebechlebsky Date: Sun, 1 May 2016 22:34:46 +0000 (+0300) Subject: avformat/tee: Use ref instead copy in write_packet X-Git-Tag: android-x86-7.1-r1~5342 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1bc83f6ea8ff35eae2113e7f21713d298c27ebd1;p=android-x86%2Fexternal-ffmpeg.git 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: Nicolas George Signed-off-by: Jan Sebechlebsky Signed-off-by: Marton Balint --- diff --git a/libavformat/tee.c b/libavformat/tee.c index 6d2ce53788..806beaa14f 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -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;