[FFmpeg-cvslog] avformat/tee: Use ref instead copy in write_packet

Jan Sebechlebsky git at videolan.org
Sat May 7 17:50:36 CEST 2016


ffmpeg | branch: master | Jan Sebechlebsky <sebechlebskyjan at gmail.com> | Mon May  2 01:34:46 2016 +0300| [1bc83f6ea8ff35eae2113e7f21713d298c27ebd1] | committer: 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: Nicolas George <george at nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan at gmail.com>
Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bc83f6ea8ff35eae2113e7f21713d298c27ebd1
---

 libavformat/tee.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/tee.c b/libavformat/tee.c
index 6d2ce53..806beaa 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;



More information about the ffmpeg-cvslog mailing list