[FFmpeg-devel] [PATCH 3/3] avformat/fifo, tee: Don't initialize before av_packet_ref()

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Sun Dec 1 12:05:46 EET 2019


It already initializes the packet.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/fifo.c | 1 -
 libavformat/tee.c  | 1 -
 2 files changed, 2 deletions(-)

diff --git a/libavformat/fifo.c b/libavformat/fifo.c
index b403ba717b..b9a43b2ff9 100644
--- a/libavformat/fifo.c
+++ b/libavformat/fifo.c
@@ -547,7 +547,6 @@ static int fifo_write_packet(AVFormatContext *avf, AVPacket *pkt)
     int ret;
 
     if (pkt) {
-        av_init_packet(&msg.pkt);
         ret = av_packet_ref(&msg.pkt,pkt);
         if (ret < 0)
             return ret;
diff --git a/libavformat/tee.c b/libavformat/tee.c
index d91993354b..d632fe2704 100644
--- a/libavformat/tee.c
+++ b/libavformat/tee.c
@@ -571,7 +571,6 @@ static int tee_write_packet(AVFormatContext *avf, AVPacket *pkt)
         if (s2 < 0)
             continue;
 
-        memset(&pkt2, 0, sizeof(AVPacket));
         if ((ret = av_packet_ref(&pkt2, pkt)) < 0)
             if (!ret_all) {
                 ret_all = ret;
-- 
2.20.1



More information about the ffmpeg-devel mailing list