diff options
author | Jan Sebechlebsky <sebechlebskyjan@gmail.com> | 2016-05-02 01:34:46 +0300 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-05-07 17:25:40 +0200 |
commit | 1bc83f6ea8ff35eae2113e7f21713d298c27ebd1 (patch) | |
tree | 891bb6718e1c5c90c7a8df588edad8c011fac539 /libavformat/tee.c | |
parent | a3c877aca78f282a2848613cc144836e55144751 (diff) | |
download | ffmpeg-1bc83f6ea8ff35eae2113e7f21713d298c27ebd1.tar.gz |
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@nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/tee.c')
-rw-r--r-- | libavformat/tee.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |