[FFmpeg-cvslog] avformat/asfdec_o: Don't reset twice

Andreas Rheinhardt git at videolan.org
Sun Nov 15 19:58:55 EET 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Tue Sep 17 19:49:51 2019 +0200| [33870a6aa7cd7c1a2308d678d97116c6285bfa96] | committer: Andreas Rheinhardt

avformat/asfdec_o: Don't reset twice

A variable has been assigned a value twice consecutively; essentially
the same happens when one performs av_init_packet on an AVPacket after
a call to av_packet_unref.

Found via PVS-Studio (see ticket #8156).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

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

 libavformat/asfdec_o.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index 2dcbc16332..9fd38f1bfe 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -1135,9 +1135,7 @@ static void reset_packet(ASFPacket *asf_pkt)
     asf_pkt->duration  = 0;
     asf_pkt->flags     = 0;
     asf_pkt->dts       = 0;
-    asf_pkt->duration  = 0;
     av_packet_unref(&asf_pkt->avpkt);
-    av_init_packet(&asf_pkt->avpkt);
 }
 
 static int asf_read_replicated_data(AVFormatContext *s, ASFPacket *asf_pkt)



More information about the ffmpeg-cvslog mailing list