Skip to content

Commit

Permalink
Explicitly initialize decoder sink_count
Browse files Browse the repository at this point in the history
The zero-initialization relied on the fact that the decoder instance is
static.
  • Loading branch information
rom1v committed May 28, 2021
1 parent 4c31911 commit 6fd7e89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6fd7e89

Please sign in to comment.