[FFmpeg-devel] [PATCH 3/4] avformat/asfdec_o: Don't reset twice
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Thu Nov 12 19:33:27 EET 2020
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>
---
This and the next one are old commits that are recycled.
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)
--
2.25.1
More information about the ffmpeg-devel
mailing list