diff mbox series

[FFmpeg-devel,3/4] avformat/asfdec_o: Don't reset twice

Message ID 20201112173328.742491-3-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/4] avformat/asfdec_o: Don't segfault with lots of attached pics
Related show


Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 12, 2020, 5:33 p.m. UTC
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@gmail.com>
This and the next one are old commits that are recycled.

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


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_init_packet(&asf_pkt->avpkt);
 static int asf_read_replicated_data(AVFormatContext *s, ASFPacket *asf_pkt)