aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-09-17 19:49:51 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-15 18:20:59 +0100
commit33870a6aa7cd7c1a2308d678d97116c6285bfa96 (patch)
tree0877dec63f0f2b0bab772fc49cbfb9a2f623d30f
parentbf4909f0a3ed0155343a64cd6611a6fe4ecd5c8d (diff)
downloadffmpeg-33870a6aa7cd7c1a2308d678d97116c6285bfa96.tar.gz
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@gmail.com>
-rw-r--r--libavformat/asfdec_o.c2
1 files changed, 0 insertions, 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)