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

Submitted by Andreas Rheinhardt on Dec. 1, 2019, 10:05 a.m.

Details

Message ID 20191201100546.16067-3-andreas.rheinhardt@gmail.com
State New
Headers show

Commit Message

Andreas Rheinhardt Dec. 1, 2019, 10:05 a.m.
It already initializes the packet.

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

Patch hide | download patch | download mbox

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;