From 6fd7e89da1d3982697af9c581b322a1ca4398621 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 28 May 2021 21:23:10 +0200 Subject: [PATCH] Explicitly initialize decoder sink_count The zero-initialization relied on the fact that the decoder instance is static. --- app/src/decoder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/decoder.c b/app/src/decoder.c index dbaa3d39..aa5018b3 100644 --- a/app/src/decoder.c +++ b/app/src/decoder.c @@ -140,6 +140,8 @@ decoder_packet_sink_push(struct sc_packet_sink *sink, const AVPacket *packet) { void decoder_init(struct decoder *decoder) { + decoder->sink_count = 0; + static const struct sc_packet_sink_ops ops = { .open = decoder_packet_sink_open, .close = decoder_packet_sink_close,