diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 81fcebce23..0b1195dc3e 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -283,7 +283,7 @@ static int ffmal_update_format(AVCodecContext *avctx) ret = AVERROR(ENOMEM); goto fail; } - atomic_store(&ctx->pool_out->refcount, 1); + atomic_init(&ctx->pool_out->refcount, 1); if (!format_out) goto fail;